<!DOCTYPE html>

<html lang="en">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width">
	<title>Documentation Class: NIM</title>

	<!--[if lt IE 9]>
	<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
	<![endif]-->
	<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">

	<link type="text/css" rel="stylesheet" href="styles/site.simplex.css">

</head>

<body>

<div class="navbar navbar-default navbar-fixed-top ">
<div class="container">
	<div class="navbar-header">
		<a class="navbar-brand" href="index.html">Documentation</a>
		<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
			<span class="icon-bar"></span>
			<span class="icon-bar"></span>
			<span class="icon-bar"></span>
        </button>
	</div>
	<div class="navbar-collapse collapse" id="topNavigation">
		<ul class="nav navbar-nav">
			
			<li class="dropdown">
				<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b class="caret"></b></a>
				<ul class="dropdown-menu ">
					<li><a href="blob.html">blob</a></li><li><a href="support.html">support</a></li><li><a href="global.html#util">util</a></li>
				</ul>
			</li>
			
			<li class="dropdown">
				<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
				<ul class="dropdown-menu ">
					<li><a href="Audio.html">Audio</a></li><li><a href="Chatroom.html">Chatroom</a></li><li><a href="ChatroomInfo.html">ChatroomInfo</a></li><li><a href="ChatroomMember.html">ChatroomMember</a></li><li><a href="ChatroomMessage.html">ChatroomMessage</a></li><li><a href="Collect.html">Collect</a></li><li><a href="Comment.html">Comment</a></li><li><a href="File.html">File</a></li><li><a href="Friend.html">Friend</a></li><li><a href="Geo.html">Geo</a></li><li><a href="Image.html">Image</a></li><li><a href="IMMessage.html">IMMessage</a></li><li><a href="LoginPort.html">LoginPort</a></li><li><a href="Netcall.html">Netcall</a></li><li><a href="NetcallWeixin.html">NetcallWeixin</a></li><li><a href="NIM.html">NIM</a></li><li><a href="NIMError.html">NIMError</a></li><li><a href="NRTC.html">NRTC</a></li><li><a href="Relation.html">Relation</a></li><li><a href="Session.html">Session</a></li><li><a href="Signaling.html">Signaling</a></li><li><a href="SuperTeam.html">SuperTeam</a></li><li><a href="SuperTeamMember.html">SuperTeamMember</a></li><li><a href="SystemMessage.html">SystemMessage</a></li><li><a href="Team.html">Team</a></li><li><a href="TeamMember.html">TeamMember</a></li><li><a href="User.html">User</a></li><li><a href="Video.html">Video</a></li><li><a href="WebRTC.html">WebRTC</a></li><li><a href="WebRTC_NRTC.html">WebRTC/NRTC</a></li><li><a href="WhiteBoard.html">WhiteBoard</a></li>
				</ul>
			</li>
			
			<li class="dropdown">
				<a href="events.list.html" class="dropdown-toggle" data-toggle="dropdown">Events<b class="caret"></b></a>
				<ul class="dropdown-menu ">
					<li><a href="NRTC.html#event:addTrack">NRTC#event:addTrack</a></li><li><a href="NRTC.html#event:audioVolume">NRTC#event:audioVolume</a></li><li><a href="NRTC.html#event:auidoMixingEnd">NRTC#event:auidoMixingEnd</a></li><li><a href="NRTC.html#event:deviceAdd">NRTC#event:deviceAdd</a></li><li><a href="NRTC.html#event:deviceRemove">NRTC#event:deviceRemove</a></li><li><a href="NRTC.html#event:deviceStatus">NRTC#event:deviceStatus</a></li><li><a href="NRTC.html#event:error">NRTC#event:error</a></li><li><a href="NRTC.html#event:gatewayClosed">NRTC#event:gatewayClosed</a></li><li><a href="NRTC.html#event:joinChannel">NRTC#event:joinChannel</a></li><li><a href="NRTC.html#event:leaveChannel">NRTC#event:leaveChannel</a></li><li><a href="NRTC.html#event:recordStopped">NRTC#event:recordStopped</a></li><li><a href="NRTC.html#event:remoteTrack">NRTC#event:remoteTrack</a></li><li><a href="NRTC.html#event:removeTrack">NRTC#event:removeTrack</a></li><li><a href="NRTC.html#event:streamEnded">NRTC#event:streamEnded</a></li><li><a href="NRTC.html#event:userJoined">NRTC#event:userJoined</a></li><li><a href="NRTC.html#event:userLeft">NRTC#event:userLeft</a></li><li><a href="NRTC.html#event:userStateUpdated">NRTC#event:userStateUpdated</a></li><li><a href="WebRTC.html#event:beCalling">WebRTC#event:beCalling</a></li><li><a href="WebRTC.html#event:callAccepted">WebRTC#event:callAccepted</a></li><li><a href="WebRTC.html#event:callerAckSync">WebRTC#event:callerAckSync</a></li><li><a href="WebRTC.html#event:callRejected">WebRTC#event:callRejected</a></li><li><a href="WebRTC.html#event:control">WebRTC#event:control</a></li><li><a href="WebRTC.html#event:hangup">WebRTC#event:hangup</a></li><li><a href="WebRTC.html#event:sessionDuration">WebRTC#event:sessionDuration</a></li>
				</ul>
			</li>
			
			<li class="dropdown">
				<a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
				<ul class="dropdown-menu ">
					<li><a href="global.html#changeRoleToAudience">changeRoleToAudience</a></li><li><a href="global.html#changeRoleToPlayer">changeRoleToPlayer</a></li><li><a href="global.html#createProgram">createProgram</a></li><li><a href="global.html#filterClientAntispam">filterClientAntispam</a></li><li><a href="global.html#loadShader">loadShader</a></li><li><a href="global.html#obj">obj</a></li><li><a href="global.html#RTC_EVENTS">RTC_EVENTS</a></li>
				</ul>
			</li>
			
		</ul>
        
            <div class="col-sm-3 col-md-3">
                <form class="navbar-form" role="search">
                    <div class="input-group">
                        <input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
                        <div class="input-group-btn">
                            <button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
                        </div>
                    </div>
                </form>
            </div>
        
	</div>

</div>
</div>


<div class="container" id="toc-content">
<div class="row">

	
	<div class="col-md-8">
	
		<div id="main">
			

	<h1 class="page-title">Class: NIM</h1>
<section>

<header>
    
        <h2>
        NIM
        </h2>
        
    
</header>


<article>
    <div class="container-overview">
    
        
<hr>
<dt>
    <h4 class="name" id="NIM"><span class="type-signature"></span>new NIM()</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>请使用 <a href="NIM.html#.getInstance"><code>NIM.getInstance</code></a> 来初始化 SDK.<br>此接口为单例模式, 对于同一个账号, 永远返回同一份实例, 即只有第一次调用会初始化一个实例, 后续调用此接口会直接返回初始化过的实例.</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

    
    </div>

    

    

    

    

    

    

    
        <h3 class="subsection-title">Methods</h3>

        <dl>
            
<hr>
<dt>
    <h4 class="name" id=".getInstance"><span class="type-signature">&lt;static> </span>getInstance(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <ul>
<li>此接口为单例模式, 对于同一个账号, 永远返回同一份实例, 即只有第一次调用会初始化一个实例</li>
<li>后续调用此接口会直接返回初始化过的实例, 同时也会调用接口<a href="NIM.html#setOptions"><code>setOptions</code></a>更新传入的配置</li>
<li>后续调用此接口时, 如果连接已断开, 会自动建立连接</li>
<li>当发生掉线时，SDK会自动进行重连</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>debug</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>
|

<span class="param-type">Object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>是否开启调试, 如果开启调试, 将会在控制台输出一些log。默认<code>false</code>不输出日志, 可以传<code>true</code>来开启日志。</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>logFunc</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>
|

<span class="param-type">Object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    null
                
                </td>
            

            <td class="description last"><p>是否对日志做额外的处理，诸如日志存储、日志上报等等，该函数会截获console日志的参数，供开发者使用</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>secure</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>
|

<span class="param-type">Object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>secure 模式下会通过 https 协议跟服务器建立连接, 非 secure 模式下会通过 http 协议跟服务器建立连接, 默认 true</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>appKey</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>在云信管理后台查看应用的 appKey</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>account</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>帐号, 应用内唯一</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>token</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>帐号的 token, 用于建立连接</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>nosScenes</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    'im'
                
                </td>
            

            <td class="description last"><p>nos文件存储全局配置，存储场景，实例有效，默认im</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>nosSurvivalTime</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    Infinity
                
                </td>
            

            <td class="description last"><p>nos文件存储全局配置，存储有效时间，实例有效，默认Infinity 不得小于一天，单位秒</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>customTag</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>客户端自定义tag，登录时多端同步改字段，最大32个字符</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onconnect</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>连接建立后的回调, 会传入一个对象, 包含登录的信息, 有以下字段</p>
<ul>
<li><code>lastLoginDeviceId</code>: 上次登录的设备的设备号</li>
<li><code>customTag</code>: 客户端自定义tag,登录时多端同步改字段，最大32个字符</li>
<li><code>connectionId</code>: 本次登录的连接号</li>
<li><code>ip</code>: 客户端IP</li>
<li><code>port</code>: 客户端端口</li>
<li><code>country</code>: 本次登录的国家</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onwillreconnect</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>即将重连的回调</p>
<ul>
<li>此时说明 SDK 已经断开连接, 请开发者在界面上提示用户连接已断开, 而且正在重新建立连接</li>
<li>此回调会收到一个对象, 包含额外的信息, 有以下字段<ul>
<li><code>duration</code>: 距离下次重连的时间</li>
<li><code>retryCount</code>: 重连尝试的次数</li>
</ul>
</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>ondisconnect</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>断开连接后的回调</p>
<ul>
<li>此时说明 SDK 处于断开状态, 开发者此时应该根据错误码提示相应的错误信息, 并且跳转到登录页面</li>
<li>此回调会收到一个对象, 包含错误的信息, 有以下字段<ul>
<li><code>code</code>: 出错时的错误码, 可能为空<ul>
<li><code>302</code>: 账号或者密码错误, 请跳转到登录页面并提示错误</li>
<li><code>417</code>: 重复登录, 已经在其它端登录了, 请跳转到登录页面并提示错误</li>
<li><code>'kicked'</code>: 被踢</li>
</ul>
</li>
</ul>
</li>
<li>当<code>code</code>为<code>'kicked'</code>的时候, 此对象会有以下字段<ul>
<li><code>reason</code>: 被踢的原因<ul>
<li><code>samePlatformKick</code>: 不允许同一个帐号在多个地方同时登录</li>
<li><code>serverKick</code>: 被服务器踢了</li>
<li><code>otherPlatformKick</code>: 被其它端踢了</li>
</ul>
</li>
<li><code>message</code>: 文字描述的被踢的原因</li>
</ul>
</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onerror</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>发生错误的回调, 会传入<a href="NIMError.html"><code>错误</code></a>对象</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onloginportschange</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>多端登录状态变化的回调, 会收到<a href="LoginPort.html"><code>登录端</code></a>列表, 以下情况会收到此回调</p>
<ul>
<li>登录时其它端在线</li>
<li>登录后其它端上线或者下线</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>syncRelations</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否同步黑名单和静音列表, 默认<code>true</code>. 如果传<code>false</code>就收不到黑名单和静音列表, 即不会收到<code>onblacklist</code>回调和<code>onmutelist</code>回调, 开发者后续可以调用<a href="NIM.html#getRelations"><code>获取黑名单和静音列表</code></a>来获取黑名单和静音列表。</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onblacklist</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>同步黑名单的回调, 会传入黑名单列表<code>blacklist</code></p>
<ul>
<li><code>blacklist</code>的属性<code>invalid</code>包含被删除的黑名单列表</li>
<li>此回调是增量回调, 可以调用<a href="NIM.html#mergeRelations"><code>nim.mergeRelations</code></a>和<a href="NIM.html#cutRelations"><code>nim.cutRelations</code></a>来合并数据</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onsyncmarkinblacklist</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>当前登录用户在其它端<a href="NIM.html#markInBlacklist"><code>加入黑名单/从黑名单移除</code></a>后的回调, 会传入一个参数, 包含两个字段</p>
<ul>
<li><code>account</code>: 要加入黑名单/从黑名单移除的账号</li>
<li><code>isAdd</code>: <code>true</code>表示加入黑名单, <code>false</code>表示从黑名单移除</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onmutelist</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>同步静音列表的回调, 会传入静音列表<code>mutelist</code></p>
<ul>
<li><code>mutelist</code>的属性<code>invalid</code>包含被删除的静音列表</li>
<li>此回调是增量回调, 可以调用<a href="NIM.html#mergeRelations"><code>nim.mergeRelations</code></a>和<a href="NIM.html#cutRelations"><code>nim.cutRelations</code></a>来合并数据</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onsyncmarkinmutelist</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>当前登录用户在其它端<a href="NIM.html#markInMutelist"><code>加入静音列表/从静音列表移除</code></a>后的回调, 会传入一个参数, 包含两个字段</p>
<ul>
<li><code>account</code>: 要加入黑名单/从黑名单移除的账号</li>
<li><code>isAdd</code>: <code>true</code>表示加入静音列表, <code>false</code>表示从静音列表移除</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>syncFriends</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>是否同步好友列表, 默认<code>true</code>. 如果传<code>false</code>就收不到<code>onfriends</code>回调, 开发者后续可以调用<a href="NIM.html#getFriends"><code>获取好友列表</code></a>来获取好友列表。</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onfriends</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>同步好友列表的回调, 会传入好友列表。没有好友时，使用数据库会调用回调传空数组，否则不回调。</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onsyncfriendaction</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>当前登录用户在其它端进行好友相关的操作后的回调</p>
<ul>
<li>操作包括<ul>
<li><a href="NIM.html#addFriend"><code>直接加为好友</code></a></li>
<li><a href="NIM.html#applyFriend"><code>申请加为好友</code></a></li>
<li><a href="NIM.html#passFriendApply"><code>通过好友申请</code></a></li>
<li><a href="NIM.html#rejectFriendApply"><code>拒绝好友申请</code></a></li>
<li><a href="NIM.html#deleteFriend"><code>删除好友</code></a></li>
<li><a href="NIM.html#updateFriend"><code>更新好友</code></a></li>
</ul>
</li>
<li>此回调会收到一个参数<code>obj</code>, 它有一个字段<code>type</code>的值为操作的类型, 具体类型如下：<ul>
<li><code>'addFriend'</code> (直接加为好友), 此时<code>obj</code>的字段如下:<ul>
<li><code>account</code>的值为被直接加为好友的账号</li>
<li><code>friend</code>为被直接加为好友的<a href="Friend.html"><code>好友对象</code></a></li>
<li><code>ps</code>为附言</li>
</ul>
</li>
<li><code>'applyFriend'</code> (申请加为好友), 此时<code>obj</code>的字段如下:<ul>
<li><code>account</code>的值为被申请加为好友的账号</li>
<li><code>ps</code>为附言</li>
</ul>
</li>
<li><code>'passFriendApply'</code> (通过好友申请), 此时<code>obj</code>的字段如下:<ul>
<li><code>account</code>的值为被通过好友申请的账号</li>
<li><code>friend</code>为被通过好友申请的<a href="Friend.html"><code>好友对象</code></a></li>
<li><code>ps</code>为附言</li>
</ul>
</li>
<li><code>'rejectFriendApply'</code> (拒绝好友申请), 此时<code>obj</code>的字段如下:<ul>
<li><code>account</code>的值为被拒绝好友申请的账号</li>
<li><code>ps</code>为附言</li>
</ul>
</li>
<li><code>'deleteFriend'</code> (删除好友), 此时<code>obj</code>的字段如下:<ul>
<li><code>account</code>的值为被删除好友的账号</li>
</ul>
</li>
<li><code>'updateFriend'</code> (更新好友), 此时<code>obj</code>的字段如下:<ul>
<li><code>friend</code>的值为被更新的<a href="Friend.html"><code>好友对象</code></a></li>
</ul>
</li>
</ul>
</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onmyinfo</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>同步登录用户名片的回调, 会传入<a href="User.html"><code>用户名片</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onupdatemyinfo</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>当前登录用户在其它端修改自己的个人名片之后的回调, 会传入<a href="User.html"><code>用户名片</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>syncFriendUsers</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>是否同步好友对应的用户名片列表, 默认<code>true</code>, 如果传<code>false</code>就收不到<code>onusers</code>回调.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onusers</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>同步好友用户名片的回调, 会传入<a href="User.html"><code>用户名片</code></a>数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onupdateuser</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>用户名片更新后的回调, 会传入<a href="User.html"><code>用户名片</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>syncSuperTeams</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否同步超大群列表, 默认<code>true</code>. 如果传<code>false</code>就收不到群列表, 即不会收到<code>onSuperTeams</code>回调, 开发者后续可以调用<a href="NIM.html#getSuperTeams"><code>获取超大群列表</code></a>来获取群列表.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onSuperTeams</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>同步超大群列表的回调, 会传入<a href="SuperTeam.html"><code>超大群</code></a>数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onSyncCreateSuperTeam</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>当前登录者创建超大群后的回调, 会传入<a href="SuperTeam.html"><code>超大群</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onUpdateSuperTeam</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>更新超大群的回调, 此方法接收一个参数, 更新后的群信息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onUpdateSuperTeamMember</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>群成员信息更新后的回调, 会传入<a href="SuperTeamMember.html"><code>超大群群成员</code></a>对象, 不过此时的信息是不完整的, 只会包括被更新的字段。当前登录帐号在其它端修改自己在群里面的昵称时也会收到此回调</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onAddSuperTeamMembers</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>新成员入超大群的回调, 此方法接收一个参数, 包含群信息和群成员信息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onRemoveSuperTeamMembers</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>有人出超大群的回调, 此方法接收一个参数, 包含群信息和被移除的群成员账号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onDismissSuperTeam</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>超大群解散的回调, 所有群成员均会收到该回调。此方法接收一个参数, 包含被解散的群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onTransferSuperTeam</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>移交超大群的回调, 此方法接收一个参数, 包含群信息和新老群主信息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onUpdateSuperTeamMembersMute</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>更新超大群群成员禁言状态的回调, 此方法接收一个参数, 包含群信息和禁言状态信息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>syncTeams</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否同步群列表, 默认<code>true</code>. 如果传<code>false</code>就收不到群列表, 即不会收到<code>onteams</code>回调, 开发者后续可以调用<a href="NIM.html#getTeams"><code>获取群列表</code></a>来获取群列表.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>syncExtraTeamInfo</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>是否同步额外的群信息, 默认<code>true</code>会同步额外的群信息, 目前包括</p>
<ul>
<li>当前登录用户是否开启某个群的消息提醒 (SDK 只是存储了此信息, 具体用此信息来做什么事情完全由开发者控制)</li>
<li>调用接口<a href="NIM.html#updateInfoInTeam"><code>NIM#updateInfoInTeam</code></a>来关闭/开启某个群的消息提醒</li>
<li>调用接口<a href="NIM.html#notifyForNewTeamMsg"><code>NIM#notifyForNewTeamMsg</code></a>来查询是否需要群消息通知</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onteams</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>同步群列表的回调, 会传入<a href="Team.html"><code>群</code></a>数组<code>teams</code></p>
<ul>
<li><code>teams</code>的属性<code>invalid</code>包含退出的群</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onsynccreateteam</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>当前登录用户在其它端<a href="NIM.html#createTeam"><code>创建群</code></a>后的回调, 会传入<a href="Team.html"><code>群对象</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>syncTeamMembers</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否同步群成员, 默认<code>true</code>. 只有在<code>syncTeams</code>=<code>true</code>的时候才起作用, 如果传<code>false</code>就不会同步群成员, 即不会收到<code>onteammembers</code>和<code>onsyncteammembersdone</code>回调, 开发者后续可以调用<a href="NIM.html#getTeamMembers"><code>获取群成员</code></a>来获取群成员.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onteammembers</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>同步群成员的回调, 一个群对应一个回调, 会传入<a href="TeamMember.html"><code>群成员</code></a>数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onsyncteammembersdone</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>当<code>syncTeams</code>和<code>syncTeamMembers</code>同时为true时, 会同步所有群的群成员, 当所有群的群成员同步结束时, 会调用此回调</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onupdateteammember</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>群成员信息更新后的回调, 会传入<a href="TeamMember.html"><code>群成员</code></a>对象, 不过此时的信息是不完整的, 只会包括被更新的字段。当前登录帐号在其它端修改自己在群里面的昵称时也会收到此回调。</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onCreateTeam</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>创建群的回调, 此方法接收一个参数, 包含群信息和群主信息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onUpdateTeam</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>更新群的回调, 此方法接收一个参数, 更新后的群信息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onAddTeamMembers</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>新成员入群的回调, 此方法接收一个参数, 包含群信息和群成员信息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onRemoveTeamMembers</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>有人出群的回调, 此方法接收一个参数, 包含群信息和群成员账号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onUpdateTeamManagers</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>更新群管理员的回调, 此方法接收一个参数, 包含群信息和管理员信息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onDismissTeam</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>解散群的回调, 此方法接收一个参数, 包含被解散的群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onTransferTeam</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>移交群的回调, 此方法接收一个参数, 包含群信息和新老群主信息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onUpdateTeamMembersMute</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>更新群成员禁言状态的回调, 此方法接收一个参数, 包含群信息和禁言状态信息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>syncSessionUnread</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>是否同步会话的未读数, 默认不同步</p>
<ul>
<li>如果选择同步<ul>
<li>那么在一个端读过的会话在其它端也会被标记为已读</li>
<li>在调用<a href="NIM.html#setCurrSession"><code>NIM#setCurrSession</code></a>的时候 SDK 会自动同步一次未读数, 此后如果收到当前会话的消息, 需要手动调用<a href="NIM.html#resetSessionUnread"><code>NIM#resetSessionUnread</code></a>来同步未读数</li>
</ul>
</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onupdatesession</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>更新会话的回调, 会传入<a href="Session.html"><code>会话</code></a>, 以下情况会收到此回调</p>
<ul>
<li>收到消息</li>
<li>发送消息</li>
<li>设置当前会话</li>
<li>重置会话未读数</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>syncStickTopSessions</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>是否同步置顶会话，默认<code>false</code>，如果传<code>true</code>，则在有置顶会话时，可以收到<code>onStickTopSessions</code>回调，传<code>false</code>则不会</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onStickTopSessions</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>同步置顶会话列表, 会传入<a href="Session.html"><code>会话</code></a>列表</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onSyncUpdateServerSession</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>更新服务端会话在线多端同步回调。多端登录时，一端调用<a href="NIM.html#updateServerSession"><code>NIM#updateServerSession</code></a>更新了服务端会话，其他端会收到该同步回调</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onSessionsWithMoreRoaming</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>同步还有更多漫游消息的会话列表。会传入会话列表，其中的<code>time</code>字段代表该会话在此时间之前的本地漫游消息是不完整的。开发者可以通过获取历史消息的方式获取该时间之前的完整消息列表</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>shouldIgnoreMsg</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>是否要忽略某消息。该方法会接收一个消息对象，如果该方法返回 true, 那么 SDK 将忽略此条消息（不计未读数，不当lastMsg，不存数据库，不触发<code>onmsg</code>通知）</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>shouldIgnoreNotification</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>是否要忽略某条通知类消息, 该方法会接收一个消息对象, 如果该方法返回 true, 那么 SDK 将忽略此条通知类消息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>shouldCountNotifyUnread</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>通知类消息是否要计入未读数，该方法接收一个消息消息，如果返回true，则将该通知消息计入未读数，否则不计入未读数</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>syncRoamingMsgs</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否同步漫游消息, 默认<code>true</code>. 如果传<code>false</code>就收不到漫游消息, 即不会收到<code>onroamingmsgs</code>回调.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>syncSuperTeamRoamingMsgs</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否额外同步大群漫游消息, 默认<code>true</code>. 如果传<code>false</code>就不会收到超大群的 <code>onroamingmsgs</code> 回调.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onroamingmsgs</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>同步漫游消息(包括超大群漫游消息和其他漫游消息)的回调, 每个会话对应一个回调, 会传入<a href="IMMessage.html"><code>消息</code></a>数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onofflinemsgs</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>同步离线消息的回调, 每个会话对应一个回调, 会传入<a href="IMMessage.html"><code>消息</code></a>数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onmsg</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>收到消息的回调, 会传入<a href="IMMessage.html"><code>消息</code></a>对象</p>
<ul>
<li>当前登录帐号在其它端发送消息之后也会收到此回调, 注意此时消息对象的<code>from</code>字段就是当前登录的帐号</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onQuickComment</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>收到快捷评论，会传入两个参数，分别是对应的<a href="IMMessage.html"><code>消息</code></a>和<code>评论</code></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onDeleteQuickComment</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>收到删除了快捷评论，会传入两个参数，分别是对应的<a href="IMMessage.html"><code>消息</code></a>和<code>评论</code></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onPinMsgChange</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>收到PIN变更，会传入两个参数，第一个参数是变更的类型，第二个参数是一个对象，有<code>msg</code>和<code>pinTag</code>两个属性，分别是被PIN的<a href="IMMessage.html"><code>消息</code></a>和PIN操作的相关信息</p>
<ul>
<li>新增/删除/更新 PIN都会收到该回调，三种变更对应的第一个参数分别是<code>add</code>、<code>delete</code>、<code>update</code></li>
<li>第二个参数的pinTag属性是一个对象，有<code>pinFrom</code>、<code>pinCustom</code>、<code>createTime</code>、<code>updateTime</code>四个字段，分别代表pin的操作者、扩展字段、创建时间和更新时间</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>syncMsgReceipts</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>是否同步已读回执时间戳, 默认<code>true</code>. 如果传<code>false</code>就收不到已读回执时间戳.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onofflinesysmsgs</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>同步离线系统通知的回调, 会传入<a href="SystemMessage.html"><code>系统通知</code></a>数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onroamingsysmsgs</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>同步漫游系统通知的回调, 会传入<a href="SystemMessage.html"><code>系统通知</code></a>数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onsysmsg</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>收到系统通知的回调, 会传入<a href="SystemMessage.html"><code>系统通知</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onupdatesysmsg</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>更新系统通知后的回调, 会传入<a href="SystemMessage.html"><code>系统通知</code></a></p>
<ul>
<li>以下情况会收到此回调<ul>
<li><a href="NIM.html#passFriendApply"><code>通过好友申请</code></a></li>
<li><a href="NIM.html#rejectFriendApply"><code>拒绝好友申请</code></a></li>
<li><a href="NIM.html#acceptTeamInvite"><code>接受入群邀请</code></a></li>
<li><a href="NIM.html#rejectTeamInvite"><code>拒绝入群邀请</code></a></li>
<li><a href="NIM.html#passTeamApply"><code>通过入群申请</code></a></li>
<li><a href="NIM.html#rejectTeamApply"><code>拒绝入群申请</code></a></li>
</ul>
</li>
<li>这些操作的发起方会收到此回调, 接收被更新的系统通知, 根据操作的类型系统通知会被更新为下面两种状态<ul>
<li><code>'passed'</code>: 已通过</li>
<li><code>'rejected'</code>: 已拒绝</li>
</ul>
</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onsysmsgunread</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>收到系统通知未读数的回调</p>
<ul>
<li>SDK 会管理内建系统通知的未读数, 此回调接收的对象包括以下字段<ul>
<li><code>total</code>: 总共的未读数</li>
<li><code>friend</code>: 所有跟好友相关的系统通知的未读数</li>
<li><code>addFriend</code>: 直接加为好友的未读数</li>
<li><code>applyFriend</code>: 申请加为好友的未读数</li>
<li><code>passFriendApply</code>: 通过好友申请的未读数</li>
<li><code>rejectFriendApply</code>: 拒绝好友申请的未读数</li>
<li><code>deleteFriend</code>: 删除好友的未读数</li>
<li><code>team</code>: 所有跟群相关的系统通知的未读数</li>
<li><code>teamInvite</code>: 入群邀请的未读数</li>
<li><code>rejectTeamInvite</code>: 接受入群邀请的未读数</li>
<li><code>applyTeam</code>: 入群申请的未读数</li>
<li><code>rejectTeamApply</code>: 拒绝入群申请的未读数</li>
</ul>
</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onupdatesysmsgunread</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>更新系统通知未读数的回调</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onofflinecustomsysmsgs</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>同步离线自定义系统通知的回调, 会传入<a href="SystemMessage.html"><code>系统通知</code></a>数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>oncustomsysmsg</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>收到自定义系统通知的回调, 会传入<a href="SystemMessage.html"><code>系统通知</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onDeleteMsgSelf</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>收到单向撤回消息的回调, 会传入被删除的<a href="IMMessage.html"><code>消息</code></a>数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onsyncdone</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>当上面各个同步（不包括下面的同步群成员）完成后, 会调用此回调；注意, SDK保证在<code>onsyncdone</code>调用的时候上面的同步肯定完成了, 但是不保证各个同步回调的顺序。</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>autoMarkRead</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否自动标记消息为已收到</p>
<ul>
<li>默认情况下SDK在收到服务器推送过来的消息后, 会在将消息推给开发者时将消息标记为已读状态, 下次登录后就不会收到标记为已读的消息。<ul>
<li>SDK通过<code>onofflinemsgs</code>、<code>onofflinesysmsgs</code>、<code>onofflinecustomsysmsgs</code>等回调将离线消息推送给开发者</li>
<li>SDK通过<code>onmsg</code>、<code>onsysmsg</code>、<code>oncustomsysmsg</code>等回调将在线消息推送给开发者</li>
</ul>
</li>
<li>如果开发者想控制标记消息为已收到的时机, 那么可以传<code>false</code>, 这样SDK就不会自动标记消息已读, 此时需要开发者在适当的时机调用相关的方法来标记消息为已读, 否则下次登录后还会收到未标记为已读的消息。<ul>
<li>调用<a href="NIM.html#markSysMsgRead"><code>标记系统通知已读</code></a>来标记<a href="SystemMessage.html"><code>系统通知</code></a>和<a href="SystemMessage.html#.type"><code>自定义系统通知</code></a>为已读状态</li>
</ul>
</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>db</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否使用数据库</p>
<ul>
<li>在支持数据库的浏览器上 SDK 会将数据缓存到数据库中, 后续同步都是增量更新, 加快初始化速度</li>
<li>如果开发者不想使用数据库, 那么可以设置<code>db</code>为<code>false</code>来禁用数据库</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>syncBroadcastMsgs</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>是否同步离线广播</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onbroadcastmsgs</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>同步到离线广播消息的回调，仅当<code>options.syncBroadcastMsgs=true</code>时，才会同步离线广播消息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>onbroadcastmsg</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>在线时收到广播消息的回调</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>thumbnailToStatic</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否将动态图片缩略为静态图片，默认将动态图片缩略为静态图片</p>
<ul>
<li>仅在<code>cover</code>和<code>contain</code>缩略模式下，才支持将动态图片缩略为动态图片，其他模式下只能缩略为静态图片</li>
<li>可以调用SDK的<code>thumbnailImage</code>，<code>processImage</code>等API生成图片的缩略图</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>rollbackDelMsgUnread</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>撤回消息后是否更新该消息影响的会话未读数。如某会话有两条消息未读，然后其中一条消息被撤回了，若该参数为true，则未读数变为1，否则未读数仍是2</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>logReport</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>是否上报异常错误日志，可以将该项设为 <code>false</code> 来禁止上报错误日志</p>
<ul>
<li>SDK会将部分错误及相关信息上传至云信统计平台，方便开发者统计及排查线上错误</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>defaultLink</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>lbs请求出错时，SDK会尝试连接该地址。默认连接云信的备用地址</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">var data = {};
var nim = new NIM({
    // 初始化SDK
    // debug: true
    appKey: &#x27;appKey&#x27;,
    account: &#x27;account&#x27;,
    token: &#x27;token&#x27;,
    onconnect: onConnect,
    onerror: onError,
    onwillreconnect: onWillReconnect,
    ondisconnect: onDisconnect,
    // 多端
    onloginportschange: onLoginPortsChange,
    // 用户关系
    onblacklist: onBlacklist,
    onsyncmarkinblacklist: onMarkInBlacklist,
    onmutelist: onMutelist,
    onsyncmarkinmutelist: onMarkInMutelist,
    // 好友关系
    onfriends: onFriends,
    onsyncfriendaction: onSyncFriendAction,
    // 用户名片
    onmyinfo: onMyInfo,
    onupdatemyinfo: onUpdateMyInfo,
    onusers: onUsers,
    onupdateuser: onUpdateUser,
    // 超大群
    onSuperTeams: onSuperTeams,
    onSyncCreateSuperTeam: onSyncCreateSuperTeam,
    onDismissSuperTeam: onDismissSuperTeam, 
    onUpdateSuperTeamMember: onUpdateSuperTeamMember,
    onUpdateSuperTeam: onUpdateSuperTeam, // 更新超大群的回调
    onAddSuperTeamMembers: onAddSuperTeamMembers, // 新成员入超大群的回调
    onRemoveSuperTeamMembers: onRemoveSuperTeamMembers
    // 群组
    onteams: onTeams,
    onsynccreateteam: onCreateTeam,
    onteammembers: onTeamMembers,
    onsyncteammembersdone: onSyncTeamMembersDone,
    onupdateteammember: onUpdateTeamMember,
    // 会话
    onsessions: onSessions,
    onupdatesession: onUpdateSession,
    // 消息
    onroamingmsgs: onRoamingMsgs,
    onofflinemsgs: onOfflineMsgs,
    onmsg: onMsg,
    // 系统通知
    onofflinesysmsgs: onOfflineSysMsgs,
    onsysmsg: onSysMsg,
    onupdatesysmsg: onUpdateSysMsg,
    onsysmsgunread: onSysMsgUnread,
    onupdatesysmsgunread: onUpdateSysMsgUnread,
    onofflinecustomsysmsgs: onOfflineCustomSysMsgs,
    oncustomsysmsg: onCustomSysMsg,
    // 同步完成
    onsyncdone: onSyncDone
});

function onConnect() {
    console.log(&#x27;连接成功&#x27;);
}
function onWillReconnect(obj) {
    // 此时说明 &#x60;SDK&#x60; 已经断开连接, 请开发者在界面上提示用户连接已断开, 而且正在重新建立连接
    console.log(&#x27;即将重连&#x27;, obj);
}
function onDisconnect(error) {
    // 此时说明 &#x60;SDK&#x60; 处于断开状态, 开发者此时应该根据错误码提示相应的错误信息, 并且跳转到登录页面
    console.log(&#x27;连接断开&#x27;, error);
    if (error) {
        switch (error.code) {
        // 账号或者密码错误, 请跳转到登录页面并提示错误
        case 302:
            break;
        // 重复登录, 已经在其它端登录了, 请跳转到登录页面并提示错误
        case 417:
            break;
        // 被踢, 请提示错误后跳转到登录页面
        case &#x27;kicked&#x27;:
            break;
        default:
            break;
        }
    }
}
function onError(error, obj) {
    console.log(&#x27;发生错误&#x27;, error, obj);
}

function onLoginPortsChange(loginPorts) {
    console.log(&#x27;当前登录帐号在其它端的状态发生改变了&#x27;, loginPorts);
}

function onBlacklist(blacklist) {
    console.log(&#x27;收到黑名单&#x27;, blacklist);
    data.blacklist = nim.mergeRelations(data.blacklist, blacklist);
    data.blacklist = nim.cutRelations(data.blacklist, blacklist.invalid);
    refreshBlacklistUI();
}
function onMarkInBlacklist(obj) {
    console.log(obj.account + &#x27;被你&#x27; + (obj.isAdd ? &#x27;加入&#x27; : &#x27;移除&#x27;) + &#x27;黑名单&#x27;, obj);
    if (obj.isAdd) {
        addToBlacklist(obj);
    } else {
        removeFromBlacklist(obj);
    }
}
function addToBlacklist(obj) {
    data.blacklist = nim.mergeRelations(data.blacklist, obj.record);
    refreshBlacklistUI();
}
function removeFromBlacklist(obj) {
    data.blacklist = nim.cutRelations(data.blacklist, obj.record);
    refreshBlacklistUI();
}
function refreshBlacklistUI() {
    // 刷新界面
}
function onMutelist(mutelist) {
    console.log(&#x27;收到静音列表&#x27;, mutelist);
    data.mutelist = nim.mergeRelations(data.mutelist, mutelist);
    data.mutelist = nim.cutRelations(data.mutelist, mutelist.invalid);
    refreshMutelistUI();
}
function onMarkInMutelist(obj) {
    console.log(obj.account + &#x27;被你&#x27; + (obj.isAdd ? &#x27;加入&#x27; : &#x27;移除&#x27;) + &#x27;静音列表&#x27;, obj);
    if (obj.isAdd) {
        addToMutelist(obj);
    } else {
        removeFromMutelist(obj);
    }
}
function addToMutelist(obj) {
    data.mutelist = nim.mergeRelations(data.mutelist, obj.record);
    refreshMutelistUI();
}
function removeFromMutelist(obj) {
    data.mutelist = nim.cutRelations(data.mutelist, obj.record);
    refreshMutelistUI();
}
function refreshMutelistUI() {
    // 刷新界面
}

function onFriends(friends) {
    console.log(&#x27;收到好友列表&#x27;, friends);
    data.friends = nim.mergeFriends(data.friends, friends);
    data.friends = nim.cutFriends(data.friends, friends.invalid);
    refreshFriendsUI();
}
function onSyncFriendAction(obj) {
    console.log(&#x27;收到好友操作&#x27;, obj);
    switch (obj.type) {
    case &#x27;addFriend&#x27;:
        console.log(&#x27;你在其它端直接加了一个好友&#x27; + obj);
        onAddFriend(obj.friend);
        break;
    case &#x27;applyFriend&#x27;:
        console.log(&#x27;你在其它端申请加了一个好友&#x27; + obj);
        break;
    case &#x27;passFriendApply&#x27;:
        console.log(&#x27;你在其它端通过了一个好友申请&#x27; + obj);
        onAddFriend(obj.friend);
        break;
    case &#x27;rejectFriendApply&#x27;:
        console.log(&#x27;你在其它端拒绝了一个好友申请&#x27; + obj);
        break;
    case &#x27;deleteFriend&#x27;:
        console.log(&#x27;你在其它端删了一个好友&#x27; + obj);
        onDeleteFriend(obj.account);
        break;
    case &#x27;updateFriend&#x27;:
        console.log(&#x27;你在其它端更新了一个好友&#x27;, obj);
        onUpdateFriend(obj.friend);
        break;
    }
}
function onAddFriend(friend) {
    data.friends = nim.mergeFriends(data.friends, friend);
    refreshFriendsUI();
}
function onDeleteFriend(account) {
    data.friends = nim.cutFriendsByAccounts(data.friends, account);
    refreshFriendsUI();
}
function onUpdateFriend(friend) {
    data.friends = nim.mergeFriends(data.friends, friend);
    refreshFriendsUI();
}
function refreshFriendsUI() {
    // 刷新界面
}

function onMyInfo(user) {
    console.log(&#x27;收到我的名片&#x27;, user);
    data.myInfo = user;
    updateMyInfoUI();
}
function onUpdateMyInfo(user) {
    console.log(&#x27;我的名片更新了&#x27;, user);
    data.myInfo = NIM.util.merge(data.myInfo, user);
    updateMyInfoUI();
}
function updateMyInfoUI() {
    // 刷新界面
}
function onUsers(users) {
    console.log(&#x27;收到用户名片列表&#x27;, users);
    data.users = nim.mergeUsers(data.users, users);
}
function onUpdateUser(user) {
    console.log(&#x27;用户名片更新了&#x27;, user);
    data.users = nim.mergeUsers(data.users, user);
}

function onSuperTeams (superTeams) {
  console.log(&#x27;收到超大群列表&#x27;, superTeams)
  data.superTeams = nim.mergeTeams(data.superTeams, superTeams)
  onInvalidSuperTeams(superTeams.invalid)
}
function onInvalidSuperTeams (teams) {
  data.superTeams = nim.cutTeams(data.superTeams, teams)
  data.invalidSuperTeams = nim.mergeTeams(data.invalidSuperTeams, teams)
  refreshSuperTeamsUI()
}

function onSyncCreateSuperTeam (team, owner) {
  console.log(&#x27;创建了一个超大群 onSyncCreateSuperTeam &#x27;, team, owner)
  data.superTeams = nim.mergeTeams(data.superTeams, team)
  refreshSuperTeamsUI()
  onSuperTeamMembers({
    teamId: team.teamId,
    members: owner
  })
}
function onAddSuperTeamMembers (team, accounts, members) {
  console.log(&#x27;添加群成员 onAddSuperTeamMembers &#x27;, team, accounts, members)
  if (!accounts &amp;&amp; !members) {
    accounts = team.accounts || []
    members = team.members || []
    team = team.team || {}
  }
  var teamId = team.teamId
  
   // 如果是别人被拉进来了，那么拼接群成员列表
   // 如果是自己被拉进来了，那么同步一次群成员列表
  
  if (accounts.indexOf(data.account) === -1) {
    onSuperTeamMembers({
      teamId: teamId,
      members: members
    })
  } else {
    // ...
  }
  onSuperTeams(team)
}
function onDismissSuperTeam(obj) {
 console.log(&#x27;解散超大群 onDismissSuperTeam&#x27;, obj);
  var teamId = obj.teamId
  removeAllSuperTeamMembers(teamId)
  data.superTeams = nim.cutTeams(data.superTeams, obj)
  refreshSuperTeamsUI()
  refreshSuperTeamMembersUI()
}
function onRemoveSuperTeamMembers (obj) {
  console.log(&#x27;移除了群成员 onRemoveSuperTeamMembers &#x27;, obj.accounts, obj)
  var teamId = obj.team.teamId
  var accounts = obj.accounts
  var team
  if (!teamId &amp;&amp; !accounts) {
    accounts = obj.accounts || []
  }
  // 如果是别人被踢了，那么移除群成员
  // 如果是自己被踢了，那么离开该群
  if (accounts.indexOf(data.account) === -1) {
     if (team) {
      onSuperTeams(team)
    }
    if (!data.superTeamMembers) {
      data.superTeamMembers = {}
    }
    data.superTeamMembers[teamId] = nim.cutTeamMembersByAccounts(
      data.superTeamMembers[teamId],
      teamId,
      accounts
    )
     refreshSuperTeamMembersUI()
  } else {
    leaveSuperTeam(teamId)
  }
}
function onUpdateSuperTeam(err, msg) {
  console.log(&#x27;更新了超大群 teamId&#x27;, err, msg)
}
function onUpdateSuperTeamMember (member) {
  console.log(&#x27;群成员信息更新了&#x27;, member) 
}
function leaveSuperTeam (teamId) {
  onInvalidSuperTeams({
    teamId: teamId
  })
  removeAllSuperTeamMembers(teamId)
}
function refreshSuperTeamsUI () {
}
function refreshSuperTeamMembersUI () {
}
function removeAllSuperTeamMembers () {
}
function onTeams(teams) {
    console.log(&#x27;群列表&#x27;, teams);
    data.teams = nim.mergeTeams(data.teams, teams);
    onInvalidTeams(teams.invalid);
}
function onInvalidTeams(teams) {
    data.teams = nim.cutTeams(data.teams, teams);
    data.invalidTeams = nim.mergeTeams(data.invalidTeams, teams);
    refreshTeamsUI();
}
function onCreateTeam(team) {
    console.log(&#x27;你创建了一个群&#x27;, team);
    data.teams = nim.mergeTeams(data.teams, team);
    refreshTeamsUI();
    onTeamMembers({
        teamId: team.teamId,
        members: owner
    });
}
function refreshTeamsUI() {
    // 刷新界面
}
function onTeamMembers(obj) {
    console.log(&#x27;收到群成员&#x27;, obj);
    var teamId = obj.teamId;
    var members = obj.members;
    data.teamMembers = data.teamMembers || {};
    data.teamMembers[teamId] = nim.mergeTeamMembers(data.teamMembers[teamId], members);
    data.teamMembers[teamId] = nim.cutTeamMembers(data.teamMembers[teamId], members.invalid);
    refreshTeamMembersUI();
}
function onSyncTeamMembersDone() {
    console.log(&#x27;同步群列表完成&#x27;);
}
function onUpdateTeamMember(teamMember) {
    console.log(&#x27;群成员信息更新了&#x27;, teamMember);
    onTeamMembers({
        teamId: teamMember.teamId,
        members: teamMember
    });
}
function refreshTeamMembersUI() {
    // 刷新界面
}

function onSessions(sessions) {
    console.log(&#x27;收到会话列表&#x27;, sessions);
    data.sessions = nim.mergeSessions(data.sessions, sessions);
    updateSessionsUI();
}
function onUpdateSession(session) {
    console.log(&#x27;会话更新了&#x27;, session);
    data.sessions = nim.mergeSessions(data.sessions, session);
    updateSessionsUI();
}
function updateSessionsUI() {
    // 刷新界面
}

function onRoamingMsgs(obj) {
    console.log(&#x27;漫游消息&#x27;, obj);
    pushMsg(obj.msgs);
}
function onOfflineMsgs(obj) {
    console.log(&#x27;离线消息&#x27;, obj);
    pushMsg(obj.msgs);
}
function onMsg(msg) {
    console.log(&#x27;收到消息&#x27;, msg.scene, msg.type, msg);
    pushMsg(msg);
}
function pushMsg(msgs) {
    if (!Array.isArray(msgs)) { msgs = [msgs]; }
    var sessionId = msgs[0].sessionId;
    data.msgs = data.msgs || {};
    data.msgs[sessionId] = nim.mergeMsgs(data.msgs[sessionId], msgs);
}

function onOfflineSysMsgs(sysMsgs) {
    console.log(&#x27;收到离线系统通知&#x27;, sysMsgs);
    pushSysMsgs(sysMsgs);
}
function onSysMsg(sysMsg) {
    console.log(&#x27;收到系统通知&#x27;, sysMsg)
    pushSysMsgs(sysMsg);
}
function onUpdateSysMsg(sysMsg) {
    pushSysMsgs(sysMsg);
}
function pushSysMsgs(sysMsgs) {
    data.sysMsgs = nim.mergeSysMsgs(data.sysMsgs, sysMsgs);
    refreshSysMsgsUI();
}
function onSysMsgUnread(obj) {
    console.log(&#x27;收到系统通知未读数&#x27;, obj);
    data.sysMsgUnread = obj;
    refreshSysMsgsUI();
}
function onUpdateSysMsgUnread(obj) {
    console.log(&#x27;系统通知未读数更新了&#x27;, obj);
    data.sysMsgUnread = obj;
    refreshSysMsgsUI();
}
function refreshSysMsgsUI() {
    // 刷新界面
}
function onOfflineCustomSysMsgs(sysMsgs) {
    console.log(&#x27;收到离线自定义系统通知&#x27;, sysMsgs);
}
function onCustomSysMsg(sysMsg) {
    console.log(&#x27;收到自定义系统通知&#x27;, sysMsg);
}

function onSyncDone() {
    console.log(&#x27;同步完成&#x27;);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="acceptSuperTeamInvite"><span class="type-signature"></span>acceptSuperTeamInvite(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>接受入群邀请</p>
<ul>
<li>群主和管理员在邀请成员加入群（通过操作<code>创建群</code>或<a href="NIM.html#addSuperTeamMembers"><code>拉人入群</code></a>）之后, 被邀请的人会收到一条类型为<code>'teamInvite'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为邀请方的帐号, <code>to</code>字段的值为对应的群ID, 此类系统通知的<code>attach</code>有一个字段<code>team</code>的值为被邀请进入的<a href="SuperTeam.html"><code>群</code></a>, 被邀请的人可以选择接受邀请或者拒绝邀请。<ul>
<li>如果<a href="NIM.html#acceptSuperTeamInvite"><code>接受入群邀请</code></a>, 那么该群的所有群成员会收到一条类型为<code>'acceptSuperTeamInvite'</code>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>, 此类群通知消息的<code>from</code>字段的值为接受入群邀请的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="SuperTeam.html"><code>群对象</code></a>, <code>attach</code>有一个字段<code>members</code>的值为接收入群邀请的群成员列表。</li>
<li>如果<a href="NIM.html#rejectSuperTeamInvite"><code>拒绝入群邀请</code></a>, 那么邀请你的人会收到一条类型为<code>'rejectSuperTeamInvite'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为拒绝入群邀请的人的帐号, <code>to</code>字段的值为对应的群ID。</li>
</ul>
</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>idServer</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>对应的系统通知的 <code>idServer</code></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>from</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>邀请方的帐号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数, 成功时会收到<a href="SuperTeam.html"><code>群资料</code></a></p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#rejectSuperTeamInvite"><code>拒绝入群邀请</code></a></li>
			
			<li><a href="NIM.html#addSuperTeamMembers"><code>拉人入群</code></a></li>
			
			<li><code>获取群成员</code></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">// 假设 sysMsg 是通过回调 &#x60;onsysmsg&#x60; 收到的系统通知
nim.acceptSuperTeamInvite({
    idServer: sysMsg.idServer,
    teamId: &#x27;123&#x27;,
    from: &#x27;zyy1&#x27;,
    done: acceptSuperTeamInviteDone
});
function acceptSuperTeamInviteDone(error, obj) {
    console.log(&#x27;接受入群邀请&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="acceptTeamInvite"><span class="type-signature"></span>acceptTeamInvite(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>接受入群邀请</p>
<ul>
<li>高级群的群主和管理员在邀请成员加入群（通过操作<a href="NIM.html#createTeam"><code>创建群</code></a>或<a href="NIM.html#addTeamMembers"><code>拉人入群</code></a>）之后, 被邀请的人会收到一条类型为<code>'teamInvite'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为邀请方的帐号, <code>to</code>字段的值为对应的群ID, 此类系统通知的<code>attach</code>有一个字段<code>team</code>的值为被邀请进入的<a href="Team.html"><code>群</code></a>, 被邀请的人可以选择接受邀请或者拒绝邀请。<ul>
<li>如果<a href="NIM.html#acceptTeamInvite"><code>接受入群邀请</code></a>, 那么该群的所有群成员会收到一条类型为<code>'acceptTeamInvite'</code>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>, 此类群通知消息的<code>from</code>字段的值为接受入群邀请的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="Team.html"><code>群对象</code></a>, <code>attach</code>有一个字段<code>members</code>的值为接收入群邀请的群成员列表。</li>
<li>如果<a href="NIM.html#rejectTeamInvite"><code>拒绝入群邀请</code></a>, 那么邀请你的人会收到一条类型为<code>'rejectTeamInvite'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为拒绝入群邀请的人的帐号, <code>to</code>字段的值为对应的群ID。</li>
</ul>
</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>idServer</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>对应的系统通知的 <code>idServer</code></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>from</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>邀请方的帐号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数, 成功时会收到<a href="Team.html"><code>群资料</code></a></p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#rejectTeamInvite"><code>拒绝入群邀请</code></a></li>
			
			<li><a href="NIM.html#addTeamMembers"><code>拉人入群</code></a></li>
			
			<li><a href="NIM.html#getTeamMembers"><code>获取群成员</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">// 假设 sysMsg 是通过回调 &#x60;onsysmsg&#x60; 收到的系统通知
nim.acceptTeamInvite({
    idServer: sysMsg.idServer,
    teamId: &#x27;123&#x27;,
    from: &#x27;zyy1&#x27;,
    done: acceptTeamInviteDone
});
function acceptTeamInviteDone(error, obj) {
    console.log(&#x27;接受入群邀请&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="addCollect"><span class="type-signature"></span>addCollect(options, done)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>增加一个收藏</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>type</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>收藏的类型，只能是整数，开发者可自定义映射规则</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>收藏的具体内容，最大20480</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>uniqueId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>唯一ID，可用于去重。当传入uniqueId时，会校验该ID之前是否存在，如不存在则会新增一个收藏，如存在则会更新之</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>custom</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>扩展字段，最大1024</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数，第一个参数是error，第二个参数有一个collect属性，是新增收藏对象</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="addFriend"><span class="type-signature"></span>addFriend(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>直接加为好友</p>
<ul>
<li><a href="NIM.html#addFriend"><code>直接加某个用户为好友</code></a>后, 对方不需要确认, 直接成为当前登录用户的好友。</li>
<li>对方会收到一条类型为<code>'addFriend'</code>的<a href="SystemMessage.html#.type"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为申请方的帐号, <code>to</code>字段的值为接收方的账号。</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>account</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>要直接加为好友的账号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>ps</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>附言, 选填, 开发者也可以使用JSON格式的字符串来扩展此内容</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#applyFriend"><code>申请加为好友</code></a></li>
			
			<li><a href="NIM.html#passFriendApply"><code>通过好友申请</code></a></li>
			
			<li><a href="NIM.html#rejectFriendApply"><code>拒绝好友申请</code></a></li>
			
			<li><a href="NIM.html#deleteFriend"><code>删除好友</code></a></li>
			
			<li><a href="NIM.html#updateFriend"><code>更新好友</code></a></li>
			
			<li><a href="NIM.html#getFriends"><code>获取好友列表</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.addFriend({
    account: &#x27;account&#x27;,
    ps: &#x27;ps&#x27;,
    done: addFriendDone
});
function addFriendDone(error, obj) {
    console.log(&#x27;直接加为好友&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
    if (!error) {
        onAddFriend(obj.friend);
    }
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="addMsgPin"><span class="type-signature"></span>addMsgPin(options, done)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>新增PIN一条消息</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>msg</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>要PIN的消息对象</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>pinCustom</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>PIN的扩展字段</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数，第一个参数是error，代表是否有错</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="addQuickComment"><span class="type-signature"></span>addQuickComment(options, done)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>增加一个快捷评论</p>
<ul>
<li>不同于消息，评论只有几个简单的字段，可删除，不计入未读数</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>msg</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="IMMessage.html">IMMessage</a></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>被回复的消息，至少要包含<code>scene</code>, <code>from</code>, <code>to</code>, <code>idServer</code>, <code>idClient</code>, <code>time</code>六个字段</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>body</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>评论的内容，只能是整数，开发者可自定义映射规则，如1点赞的表情、2对应鼓掌的表情等等</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>custom</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>扩展字段，最大8字节</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>needPush</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>是否需要推送</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>needBadge</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>是否需要角标</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>pushTitle</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>推送的标题</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>apnsText</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>自定义推送文案</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>pushPayload</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>第三方自定义的推送属性，限制json字符串，长度最大2048字节</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数，第一个参数是error，第二个参数返回完整的评论内容和时间戳</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="addStickTopSession"><span class="type-signature"></span>addStickTopSession(options, done)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>新增会话置顶</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>id</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>要置顶的会话ID</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>topCustom</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>会话置顶的扩展字段</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数，第一个参数是error，代表是否有错</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="addSuperTeamManagers"><span class="type-signature"></span>addSuperTeamManagers(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>添加群管理员</p>
<ul>
<li><a href="NIM.html#addSuperTeamManagers"><code>添加群管理员</code></a>后, 所有<a href="SuperTeamMember.html"><code>群成员</code></a>会收到一条类型为<a href="IMMessage.html#.attach"><code><code>'addSuperTeamManagers'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。此类群通知消息的<code>from</code>字段的值为添加群管理员的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>accounts</code>的值为被加为管理员的帐号列表, <code>attach</code>有一个字段<code>members</code>的值为被加为管理员的群成员列表。</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>accounts</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>



            
            </td>

            

            

            <td class="description last"><p>要添加的管理员帐号列表</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#removeSuperTeamManagers"><code>移除群管理员</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.addSuperTeamManagers({
    teamId: &#x27;123&#x27;,
    accounts: [&#x27;a2&#x27;, &#x27;a3&#x27;],
    done: addSuperTeamManagersDone
});
function addSuperTeamManagersDone(error, obj) {
    console.log(&#x27;添加群管理员&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="addSuperTeamMembers"><span class="type-signature"></span>addSuperTeamMembers(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>添加群成员</p>
<ul>
<li>当<a href="SuperTeam.html#.beInviteMode"><code>超大群被邀请模式</code></a>是<code>needVerify</code>时，<a href="NIM.html#addSuperTeamMembers"><code>添加群成员</code></a>后，被邀请的人会直接进群，此时所有<a href="SuperTeamMember.html"><code>超大群群成员</code></a>会收到一条类型为<a href="IMMessage.html#.attach"><code><code>'addSuperTeamMembers'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。此类群通知消息的<code>from</code>字段的值为邀请者的帐号, <code>to</code>字段的值为对应的群ID；<code>attach</code>有一个字段<code>team</code>的值为对应的<a href="SuperTeam.html"><code>超大群对象</code></a>，有一个字段members是被邀请新入群的成员信息数组。</li>
<li>当<a href="SuperTeam.html#.beInviteMode"><code>超大群被邀请模式</code></a>是<code>noVerify</code>时，<a href="NIM.html#addSuperTeamMembers"><code>添加群成员</code></a>后，被邀请的人会收到一条类型为<code>'superTeamInvite'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为邀请方的帐号, <code>to</code>字段的值为对应的群ID, 此类系统通知的<code>attach</code>有一个字段<code>team</code>的值为被邀请进入的<a href="SuperTeam.html"><code>超大群</code></a>, 被邀请的人可以选择<a href="NIM.html#acceptSuperTeamInvite"><code>接受入群邀请</code></a>或者<a href="NIM.html#rejectSuperTeamInvite"><code>拒绝入群邀请</code></a>。</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>超大群ID</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>accounts</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>邀请入群的账号列表</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>ps</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>附言, 选填, 长度不能大于5000, 开发者也可以使用JSON格式的字符串来扩展此内容</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.addSuperTeamMembers({
   teamId: &#x27;123&#x27;,
   accounts: [&#x27;a1&#x27;, &#x27;a1&#x27;],
   done: addSuperTeamMembersDone
})
function addSuperTeamMembersDone(error, obj) {
    console.log(&#x27;入群邀请发送&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="addTeamManagers"><span class="type-signature"></span>addTeamManagers(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>添加群管理员</p>
<ul>
<li><a href="NIM.html#addTeamManagers"><code>添加群管理员</code></a>后, 所有<a href="TeamMember.html"><code>群成员</code></a>会收到一条类型为<a href="IMMessage.html#.attach"><code><code>'addTeamManagers'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。此类群通知消息的<code>from</code>字段的值为添加群管理员的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>accounts</code>的值为被加为管理员的帐号列表, <code>attach</code>有一个字段<code>members</code>的值为被加为管理员的群成员列表。</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>accounts</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>



            
            </td>

            

            

            <td class="description last"><p>要添加的管理员帐号列表</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#removeTeamManagers"><code>移除群管理员</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.addTeamManagers({
    teamId: &#x27;123&#x27;,
    accounts: [&#x27;a2&#x27;, &#x27;a3&#x27;],
    done: addTeamManagersDone
});
function addTeamManagersDone(error, obj) {
    console.log(&#x27;添加群管理员&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="addTeamMembers"><span class="type-signature"></span>addTeamMembers(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>拉人入群</p>
<ul>
<li>普通群, <a href="NIM.html#addTeamMembers"><code>拉人入群</code></a>后, 所有<a href="TeamMember.html"><code>群成员</code></a>会收到一条类型为<a href="IMMessage.html#.attach"><code><code></code>'addTeamMembers'<code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。此类群通知消息的</code>from<code>字段的值为拉人的人的帐号,</code>to<code>字段的值为对应的群ID,</code>attach<code>有一个字段</code>team<code>的值为对应的[群对象](#群对象),</code>attach<code>有一个字段</code>accounts<code>的值为被拉的人的帐号列表,</code>attach<code>有一个字段</code>members`的值为被拉的群成员列表。<ul>
<li>被邀请的群成员在有人说话后才能看到该<a href="Team.html"><code>群</code></a>, 而且会先收到一条类型为<a href="IMMessage.html#.attach"><code><code>'addTeamMembers'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>, 然后会收到其它<code>群消息</code>。</li>
</ul>
</li>
<li>高级群的群主和管理员在邀请成员加入群（通过操作<a href="NIM.html#createTeam"><code>创建群</code></a>或<a href="NIM.html#addTeamMembers"><code>拉人入群</code></a>）之后, 被邀请的人会收到一条类型为<code>'teamInvite'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为邀请方的帐号, <code>to</code>字段的值为对应的群ID, 此类系统通知的<code>attach</code>有一个字段<code>team</code>的值为被邀请进入的<a href="Team.html"><code>群</code></a>, 被邀请的人可以选择接受邀请或者拒绝邀请。<ul>
<li>如果<a href="NIM.html#acceptTeamInvite"><code>接受入群邀请</code></a>, 那么该群的所有群成员会收到一条类型为<code>'acceptTeamInvite'</code>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>, 此类群通知消息的<code>from</code>字段的值为接受入群邀请的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="Team.html"><code>群对象</code></a>, <code>attach</code>有一个字段<code>members</code>的值为接收入群邀请的群成员列表。</li>
<li>如果<a href="NIM.html#rejectTeamInvite"><code>拒绝入群邀请</code></a>, 那么邀请你的人会收到一条类型为<code>'rejectTeamInvite'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为拒绝入群邀请的人的帐号, <code>to</code>字段的值为对应的群ID。</li>
</ul>
</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>accounts</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>要拉进群的成员的帐号列表</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>ps</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>附言, 选填, 开发者也可以使用JSON格式的字符串来扩展此内容</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>custom</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>自定义扩展字段，选填，最长512字符，开发者也可以使用JSON格式的字符串来扩展此内容</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#acceptTeamInvite"><code>接受入群邀请</code></a></li>
			
			<li><a href="NIM.html#rejectTeamInvite"><code>拒绝入群邀请</code></a></li>
			
			<li><a href="NIM.html#removeTeamMembers"><code>踢人出群</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.addTeamMembers({
    teamId: &#x27;123&#x27;,
    accounts: [&#x27;a3&#x27;, &#x27;a4&#x27;],
    ps: &#x27;加入我们的群吧&#x27;,
    custom: &#x27;&#x27;,
    done: addTeamMembersDone
});
function addTeamMembersDone(error, obj) {
    console.log(&#x27;入群邀请发送&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="addToBlacklist"><span class="type-signature"></span>addToBlacklist(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>加入黑名单</p>
<ul>
<li>如果一个用户被加入了黑名单, 那么就不再会收到此用户发送的消息</li>
<li>SDK内部调用<a href="NIM.html#markInBlacklist"><code>nim.markInBlacklist</code></a>来完成实际工作</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>account</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>要加入黑名单的账号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#markInBlacklist"><code>nim.markInBlacklist</code></a></li>
			
			<li><a href="NIM.html#removeFromBlacklist"><code>nim.removeFromBlacklist</code></a></li>
			
			<li><a href="NIM.html#getRelations"><code>nim.getRelations</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.addToBlacklist({
    account: &#x27;account&#x27;,
    done: addToBlacklistDone
});
function addToBlacklistDone(error, obj) {
    console.log(&#x27;加入黑名单&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
    if (!error) {
        addToBlacklist(obj);
    }
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="addToMutelist"><span class="type-signature"></span>addToMutelist(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>加入静音列表</p>
<ul>
<li>SDK只负责维护静音列表, 具体要根据静音列表进行的操作由开发者决定</li>
<li>SDK内部调用<a href="NIM.html#markInMutelist"><code>nim.markInMutelist</code></a>来完成实际工作</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>account</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>要加入静音列表的账号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#markInMutelist"><code>nim.markInMutelist</code></a></li>
			
			<li><a href="NIM.html#removeFromMutelist"><code>nim.removeFromMutelist</code></a></li>
			
			<li><a href="NIM.html#getRelations"><code>nim.getRelations</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.addToMutelist({
    account: &#x27;account&#x27;,
    done: addToMutelistDone
});
function addToMutelistDone(error, obj) {
    console.log(&#x27;加入静音列表&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
    if (!error) {
        addToMutelist(obj);
    }
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="applyFriend"><span class="type-signature"></span>applyFriend(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>申请加为好友</p>
<ul>
<li><a href="NIM.html#applyFriend"><code>申请加某个用户为好友</code></a>后, 对方会收到一条类型为<code>'applyFriend'</code>的<a href="SystemMessage.html#.type"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为申请方的帐号, <code>to</code>字段的值为接收方的账号, 用户在收到好友申请后, 可以选择通过或者拒绝好友申请。<ul>
<li>如果<a href="NIM.html#passFriendApply"><code>通过好友申请</code></a>, 那么申请方会收到一条类型为<code>'passFriendApply'</code>的<a href="SystemMessage.html#.type"><code>系统通知</code></a>, 此类群通知消息的<code>from</code>字段的值为通过方的帐号, <code>to</code>字段的值为申请方的账号。</li>
<li>如果<a href="NIM.html#rejectFriendApply"><code>拒绝好友申请</code></a>, 那么申请方会收到一条类型为<code>'rejectFriendApply'</code>的<a href="SystemMessage.html#.type"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为拒绝方的帐号, <code>to</code>字段的值为申请方的账号。</li>
</ul>
</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>account</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>要申请加为好友的账号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>ps</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>附言, 选填, 开发者也可以使用JSON格式的字符串来扩展此内容</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#applyFriend"><code>直接加为好友</code></a></li>
			
			<li><a href="NIM.html#passFriendApply"><code>通过好友申请</code></a></li>
			
			<li><a href="NIM.html#rejectFriendApply"><code>拒绝好友申请</code></a></li>
			
			<li><a href="NIM.html#deleteFriend"><code>删除好友</code></a></li>
			
			<li><a href="NIM.html#updateFriend"><code>更新好友</code></a></li>
			
			<li><a href="NIM.html#getFriends"><code>获取好友列表</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.applyFriend({
    account: &#x27;account&#x27;,
    ps: &#x27;ps&#x27;,
    done: applyFriendDone
});
function applyFriendDone(error, obj) {
    console.log(&#x27;申请加为好友&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="applySuperTeam"><span class="type-signature"></span>applySuperTeam(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>申请入群</p>
<ul>
<li>用户可以主动<a href="NIM.html#applySuperTeam"><code>申请加入高级群</code></a>, 目标群的群主和管理员会收到一条类型为<code>'applySuperTeam'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为申请方的帐号, <code>to</code>字段的值为对应的群ID, 高级群的群主和管理员在收到入群申请后, 可以选择通过或者拒绝入群申请。<ul>
<li>如果<a href="NIM.html#passSuperTeamApply"><code>通过入群申请</code></a>, 那么该群的所有群成员会收到一条类型为<code>'passSuperTeamApply'</code>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>, 此类群通知消息的<code>from</code>字段的值为通过入群申请的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="SuperTeam.html"><code>群对象</code></a>, <code>attach</code>有一个字段<code>account</code>包含了申请方的帐号, <code>attach</code>有一个字段<code>members</code>的值为被通过申请的群成员列表。</li>
<li>如果<a href="NIM.html#rejectSuperTeamApply"><code>拒绝入群申请</code></a>, 那么申请人会收到一条类型为<code>'rejectSuperTeamApply'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为拒绝方的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="SuperTeam.html"><code>群</code></a>。</li>
</ul>
</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>ps</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>附言, 选填, 长度不能大于5000, 开发者也可以使用JSON格式的字符串来扩展此内容</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>结果回调函数, 成功时会收到<a href="Team.html"><code>群资料</code></a></p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#passSuperTeamApply"><code>通过入群申请</code></a></li>
			
			<li><a href="NIM.html#rejectSuperTeamApply"><code>拒绝入群申请</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.applySuperTeam({
    teamId: &#x27;123&#x27;,
    ps: &#x27;请加&#x27;,
    done: applySuperTeamDone
});
function applySuperTeamDone(error, obj) {
    console.log(&#x27;申请入群&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="applyTeam"><span class="type-signature"></span>applyTeam(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>申请入群</p>
<ul>
<li>用户可以主动<a href="NIM.html#applyTeam"><code>申请加入高级群</code></a>, 目标群的群主和管理员会收到一条类型为<code>'applyTeam'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为申请方的帐号, <code>to</code>字段的值为对应的群ID, 高级群的群主和管理员在收到入群申请后, 可以选择通过或者拒绝入群申请。<ul>
<li>如果<a href="NIM.html#passTeamApply"><code>通过入群申请</code></a>, 那么该群的所有群成员会收到一条类型为<code>'passTeamApply'</code>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>, 此类群通知消息的<code>from</code>字段的值为通过入群申请的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="Team.html"><code>群对象</code></a>, <code>attach</code>有一个字段<code>account</code>包含了申请方的帐号, <code>attach</code>有一个字段<code>members</code>的值为被通过申请的群成员列表。</li>
<li>如果<a href="NIM.html#rejectTeamApply"><code>拒绝入群申请</code></a>, 那么申请人会收到一条类型为<code>'rejectTeamApply'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为拒绝方的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="Team.html"><code>群</code></a>。</li>
</ul>
</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>ps</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>附言, 选填, 开发者也可以使用JSON格式的字符串来扩展此内容</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>结果回调函数, 成功时会收到<a href="Team.html"><code>群资料</code></a></p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#passTeamApply"><code>通过入群申请</code></a></li>
			
			<li><a href="NIM.html#rejectTeamApply"><code>拒绝入群申请</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.applyTeam({
    teamId: &#x27;123&#x27;,
    ps: &#x27;请加&#x27;,
    done: applyTeamDone
});
function applyTeamDone(error, obj) {
    console.log(&#x27;申请入群&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="audioToMp3"><span class="type-signature"></span>audioToMp3(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>将音频 url 转为 mp3</p>
<ul>
<li>此方法会返回一个新的 url</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>url</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>转为 mp3 后的 url</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">String</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">var url = &#x27;http://b12026.nos.netease.com/MTAxMTAxMA==/bmltYV8xMTQwMzFfMTQ1MTg4ODk5MjMxMV9mNmI1Y2QyZC03N2UzLTQxNmUtYWY5NC1iODlhZGY4ZTYzYWQ=&#x27;;
var mp3Url = nim.audioToMp3({
    url: url
});
console.log(mp3Url);</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="audioToText"><span class="type-signature"></span>audioToText(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>音频转文字</p>
<ul>
<li>仅支持通过<a href="NIM.html#previewFile"><code>previewFile</code></a>或者<a href="NIM.html#sendFile"><code>sendFile</code></a>拿到的音频 url, 或者收到的音频消息的 url</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>音频 url</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数, 成功时会额外附上文本 text</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">var url = &#x27;http://nim.nos.netease.com/MTAxMTAwMg==/bmltYV8xNDc5OTNfMTQ1MTg5MDI2MjY0MF9lYzk1MWMyZC1hMzRmLTQ1YzctYWI2ZS1kZWE2NTA2M2Q4NjY=&#x27;;
nim.audioToText({
    url: url,
    done: audioToTextDone
});
function audioToTextDone(error, obj) {
    console.log(&#x27;语音转文字&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="blurImage"><span class="type-signature"></span>blurImage(options, radius, sigma)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>高斯模糊图片</p>
<ul>
<li>只支持通过<a href="NIM.html#previewFile"><code>预览文件</code></a>或<a href="NIM.html#sendFile"><code>发送文件消息</code></a>拿到的图片 url, 或者经过其他图片操作后拿到的图片 url</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>原图 url</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>radius</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            

            

            <td class="description last"><p>高斯模糊半径, 不包含中心点的像素, 取值范围 [1,50]</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>sigma</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            

            

            <td class="description last"><p>高斯模糊标准差, 不能小于 0</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options.done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数, 成功时附上高斯模糊后的图片 url</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">var url = &#x27;http://nim.nos.netease.com/MTAxMTAwMg==/bmltYV8xNDc5OTNfMTQ0MzE0NTgyNDI0M184YjFkYTMwMS02NjcxLTRiYjktYTUwZC04ZTVlZjZlNzZjMzA=&#x27;;
var blurUrl = nim.blurImage({
    url: url,
    radius: 5,
    sigma: 3,
    done: blurImageDone
});
function blurImageDone(error, obj) {
    console.log(&#x27;高斯模糊图片&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="clearServerHistoryMsgs"><span class="type-signature"></span>clearServerHistoryMsgs(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>删除单人会话服务器聊天记录</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>account</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>对方账号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>delRoam</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            

            

            <td class="description last"><p>是否同时删除漫游，默认<code>true</code></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.clearServerHistoryMsgs({
    account: &#x27;xxx&#x27;,
    delRoam: false,
    done: clearServerHistoryMsgsDone
});
function clearServerHistoryMsgsDone(error, obj) {
    console.log(&#x27;删除服务器消息&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="connect"><span class="type-signature"></span>connect()</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>登录 SDK</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#disconnect"><code>disconnect</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.connect();</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="createTeam"><span class="type-signature"></span>createTeam(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>创建群</p>
<ul>
<li><a href="Team.html#.type"><code>普通群</code></a>不可以设置<a href="Team.html#.joinMode"><code>群加入方式</code></a></li>
<li><a href="Team.html#.type"><code>高级群</code></a>的<a href="Team.html#.joinMode"><code>群加入方式</code></a>默认为<code>'needVerify'</code></li>
<li><a href="Team.html#.type"><code>高级群</code></a>的<a href="Team.html#.beInviteMode"><code>群被邀请模式</code></a>默认为<code>'needVerify'</code></li>
<li><a href="Team.html#.type"><code>高级群</code></a>的<a href="Team.html#.inviteMode"><code>群邀请模式</code></a>默认为<code>'manager'</code></li>
<li><a href="Team.html#.type"><code>高级群</code></a>的<a href="Team.html#.updateTeamMode"><code>群信息修改权限</code></a>默认为<code>'manager'</code></li>
<li><a href="Team.html#.type"><code>高级群</code></a>的<a href="Team.html#.updateCustomMode"><code>群信息自定义字段修改权限</code></a>默认为<code>'manager'</code></li>
<li><a href="Team.html#.type"><code>普通群</code></a>被邀请的<a href="TeamMember.html"><code>群成员</code></a>在有人说话之后才会看到该<a href="Team.html"><code>群</code></a>, 而且会先收到一条类型为<a href="IMMessage.html#.attach"><code>'addTeamMembers'</code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>, 然后会收到其它<a href="IMMessage.html#.scene"><code>群消息</code></a>。</li>
<li><a href="Team.html#.type"><code>高级群</code></a>被邀请的<a href="TeamMember.html"><code>群成员</code></a>会收到一条类型为<a href="SystemMessage.html#.type"><code>'teamInvite'</code></a>的<a href="SystemMessage.html"><code>系统通知</code></a>。<ul>
<li>接受邀请后, 所有<a href="TeamMember.html"><code>群成员</code></a>会收到一条类型为<a href="IMMessage.html#.attach"><code>'acceptTeamInvite'</code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。</li>
<li>拒绝邀请后, <code>群主</code>会收到一条类型为<a href="IMMessage.html#.attach"><code>'rejectTeamInvite'</code></a>的<a href="SystemMessage.html"><code>系统通知</code></a>。</li>
</ul>
</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>type</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p><a href="Team.html#.type"><code>群类型</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>name</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>群名字</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>avatar</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>群头像</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>accounts</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>要拉进群的成员的帐号列表</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>intro</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>群简介</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>announcement</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>群公告</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>joinMode</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p><a href="Team.html#.joinMode"><code>群加入方式</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>beInviteMode</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p><a href="Team.html#.beInviteMode"><code>群被邀请模式</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>inviteMode</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p><a href="Team.html#.inviteMode"><code>群邀请模式</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>updateTeamMode</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p><a href="Team.html#.updateTeamMode"><code>群信息修改权限</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>updateCustomMode</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>Team.updateCustomMode|群信息自定义字段修改权限}</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>custom</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>扩展字段</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>ps</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>附言, 选填, 开发者也可以使用JSON格式的字符串来扩展此内容</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>结果回调函数, 成功时会收到<a href="Team.html"><code>群资料</code></a></p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#addTeamMembers"><code>拉人入群</code></a></li>
			
			<li><a href="NIM.html#removeTeamMembers"><code>踢人出群</code></a></li>
			
			<li><a href="NIM.html#updateTeam"><code>更新群</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">// 创建普通群
nim.createTeam({
    type: &#x27;normal&#x27;,
    name: &#x27;普通群&#x27;,
    avatar: &#x27;avatar&#x27;,
    accounts: [&#x27;a1&#x27;, &#x27;a2&#x27;],
    ps: &#x27;我建了一个普通群&#x27;,
    done: createTeamDone
});
// 创建高级群
nim.createTeam({
    type: &#x27;advanced&#x27;,
    name: &#x27;高级群&#x27;,
    avatar: &#x27;avatar&#x27;,
    accounts: [&#x27;a1&#x27;, &#x27;a2&#x27;],
    intro: &#x27;群简介&#x27;,
    announcement: &#x27;群公告&#x27;,
    // joinMode: &#x27;needVerify&#x27;,
    // beInviteMode: &#x27;needVerify&#x27;,
    // inviteMode: &#x27;manager&#x27;,
    // updateTeamMode: &#x27;manager&#x27;,
    // updateCustomMode: &#x27;manager&#x27;,
    ps: &#x27;我建了一个高级群&#x27;,
    done: createTeamDone
});
function createTeamDone(error, obj) {
    console.log(&#x27;创建&#x27; + obj.team.type + &#x27;群&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
    if (!error) {
        onCreateTeam(obj.team, obj.owner);
    }
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="cropImage"><span class="type-signature"></span>cropImage(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>裁剪图片</p>
<ul>
<li>只支持通过<a href="NIM.html#previewFile"><code>预览文件</code></a>或<a href="NIM.html#sendFile"><code>发送文件消息</code></a>拿到的图片 url, 或者经过其他图片操作后拿到的图片 url</li>
<li>从坐标 (x, y) 处截取尺寸为 width*height 的图片, (0, 0) 代表左上角</li>
<li>width/height 不能小于0, 如果 width/height 大于图片的原始宽度/高度, 那么将被替换为图片的原始宽度/高度</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>原图 url</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">Int</span>



            
            </td>

            

            

            <td class="description last"><p>起点坐标 x, 必须需为整数, 此方法内部使用 Math.round 来格式化 x/y/width/height</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y</code></td>
            

            <td class="type">
            
                
<span class="param-type">Int</span>



            
            </td>

            

            

            <td class="description last"><p>起点坐标 y, 必须需为整数, 此方法内部使用 Math.round 来格式化 x/y/width/height</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>width</code></td>
            

            <td class="type">
            
                
<span class="param-type">Int</span>



            
            </td>

            

            

            <td class="description last"><p>宽度, 必须需为整数, 此方法内部使用 Math.round 来格式化 x/y/width/height</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>height</code></td>
            

            <td class="type">
            
                
<span class="param-type">Int</span>



            
            </td>

            

            

            <td class="description last"><p>高度, 必须需为整数, 此方法内部使用 Math.round 来格式化 x/y/width/height</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数, 成功时附上裁剪后的图片的 url</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">var url = &#x27;http://nim.nos.netease.com/MTAxMTAwMg==/bmltYV8xNDc5OTNfMTQ0MzE0NTgyNDI0M184YjFkYTMwMS02NjcxLTRiYjktYTUwZC04ZTVlZjZlNzZjMzA=&#x27;;
var cropUrl = nim.cropImage({
    url: url,
    x: 100,
    y: 0,
    width: 250,
    height: 250,
    done: function cropImageDone
});
function cropImageDone(error, obj) {
    console.log(&#x27;裁剪图片&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="cutFriends"><span class="type-signature"></span>cutFriends(olds, invalids)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>去除好友</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含去除后的好友列表</li>
<li>去除时按照 <code>account</code> 的值去除</li>
<li>此方法内部调用 <a href="global.html#util#.cutObjArray"><code>NIM.util.cutObjArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!olds) {return olds;}
if (!invalids) {return olds;}
if (!NIM.util.isArray(invalids)) { invalids = [invalids]; }
if (!invalids.length) {return olds;}
var options = {
  keyPath: 'account'
};
NIM.util.cutObjArray(olds, invalids, options);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.cutObjArray"><code>NIM.util.cutObjArray</code></a> 来去除好友</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>olds</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="Friend.html">Friend</a>></span>



            
            </td>

            

            

            <td class="description last"><p>原始好友数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>invalids</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Friend.html">Friend</a></span>
|

<span class="param-type">Array.&lt;<a href="Friend.html">Friend</a>></span>



            
            </td>

            

            

            <td class="description last"><p>待去除的好友或好友数组</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>去除后的好友数组</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array.&lt;<a href="Friend.html">Friend</a>></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="cutFriendsByAccounts"><span class="type-signature"></span>cutFriendsByAccounts(olds, invalids)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>去除<code>accounts</code>对应的好友</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含去除后的好友列表</li>
<li>去除时按照 <code>account</code> 的值去除</li>
<li>此方法内部调用 <a href="NIM.html#cutFriends"><code>nim.cutFriends</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!NIM.util.isArray(accounts)) { accounts = [accounts]; }
var invalids = accounts.map(function(account) {
  return {
      account: account
  };
});
return nim.cutFriends(olds, invalids);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.cutObjArray"><code>NIM.util.cutObjArray</code></a> 来去除好友</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>olds</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="Friend.html">Friend</a>></span>



            
            </td>

            

            

            <td class="description last"><p>原始好友数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>invalids</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Friend.html">Friend</a></span>
|

<span class="param-type">Array.&lt;<a href="Friend.html">Friend</a>></span>



            
            </td>

            

            

            <td class="description last"><p>待去除的好友或好友数组</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>去除后的好友数组</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array.&lt;<a href="Friend.html">Friend</a>></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="cutLoginPorts"><span class="type-signature"></span>cutLoginPorts(olds, invalids)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>去除登录端</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含去除后的登录端列表</li>
<li>去除时按照 <code>account</code> 的值去除</li>
<li>此方法内部调用 <a href="global.html#util#.cutObjArray"><code>NIM.util.cutObjArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!olds) {return olds;}
if (!invalids) {return olds;}
if (!NIM.util.isArray(invalids)) { invalids = [invalids]; }
if (!invalids.length) {return olds;}
var options = {
  keyPath: 'account'
};
NIM.util.cutObjArray(olds, invalids, options);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.cutObjArray"><code>NIM.util.cutObjArray</code></a> 来去除登录端</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>olds</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="LoginPort.html">LoginPort</a>></span>



            
            </td>

            

            

            <td class="description last"><p>原始登录端数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>invalids</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="LoginPort.html">LoginPort</a></span>
|

<span class="param-type">Array.&lt;<a href="LoginPort.html">LoginPort</a>></span>



            
            </td>

            

            

            <td class="description last"><p>待去除的登录端或登录端数组</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>去除后的登录端数组</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array.&lt;<a href="LoginPort.html">LoginPort</a>></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="cutRelations"><span class="type-signature"></span>cutRelations(olds, invalids)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>去除关系</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含去除后的关系列表</li>
<li>去除时按照 <code>account</code> 的值去除</li>
<li>此方法内部调用 <a href="global.html#util#.cutObjArray"><code>NIM.util.cutObjArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!olds) {return olds;}
if (!invalids) {return olds;}
if (!NIM.util.isArray(invalids)) { invalids = [invalids]; }
if (!invalids.length) {return olds;}
var options = {
  keyPath: 'account'
};
NIM.util.cutObjArray(olds, invalids, options);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.cutObjArray"><code>NIM.util.cutObjArray</code></a> 来去除关系</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>olds</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="Relation.html">Relation</a>></span>



            
            </td>

            

            

            <td class="description last"><p>原始关系数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>invalids</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Relation.html">Relation</a></span>
|

<span class="param-type">Array.&lt;<a href="Relation.html">Relation</a>></span>



            
            </td>

            

            

            <td class="description last"><p>待去除的关系或关系数组</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>去除后的关系数组</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array.&lt;<a href="Relation.html">Relation</a>></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="cutTeamMembers"><span class="type-signature"></span>cutTeamMembers(olds, invalids)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>去除群成员</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含去除后的群成员列表</li>
<li>去除时按照 <code>id</code> 的值去除</li>
<li>此方法内部调用 <a href="global.html#util#.cutObjArray"><code>NIM.util.cutObjArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!olds) {return olds;}
if (!invalids) {return olds;}
if (!NIM.util.isArray(invalids)) { invalids = [invalids]; }
if (!invalids.length) {return olds;}
var options = {
};
NIM.util.cutObjArray(olds, invalids, options);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.cutObjArray"><code>NIM.util.cutObjArray</code></a> 来去除群成员</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>olds</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="TeamMember.html">TeamMember</a>></span>



            
            </td>

            

            

            <td class="description last"><p>原始群成员数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>invalids</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="TeamMember.html">TeamMember</a></span>
|

<span class="param-type">Array.&lt;<a href="TeamMember.html">TeamMember</a>></span>



            
            </td>

            

            

            <td class="description last"><p>待去除的群成员或群成员数组</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>去除后的群成员数组</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array.&lt;<a href="TeamMember.html">TeamMember</a>></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="cutTeamMembersByAccounts"><span class="type-signature"></span>cutTeamMembersByAccounts(olds, invalids)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>去除<code>accounts</code>对应的群成员</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含去除后的群成员列表</li>
<li>去除时按照 <code>account</code> 的值去除</li>
<li>此方法内部调用 <a href="NIM.html#cutTeamMembers"><code>nim.cutTeamMembers</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!NIM.util.isArray(accounts)) { accounts = [accounts]; }
var invalids = TeamMember.assembleMembers({
  teamId: teamId
}, accounts);
return nim.cutTeamMembers(olds, invalids);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.cutObjArray"><code>NIM.util.cutObjArray</code></a> 来去除群成员</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>olds</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="TeamMember.html">TeamMember</a>></span>



            
            </td>

            

            

            <td class="description last"><p>原始群成员数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>invalids</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="TeamMember.html">TeamMember</a></span>
|

<span class="param-type">Array.&lt;<a href="TeamMember.html">TeamMember</a>></span>



            
            </td>

            

            

            <td class="description last"><p>待去除的群成员或群成员数组</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>去除后的群成员数组</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array.&lt;<a href="TeamMember.html">TeamMember</a>></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="cutTeams"><span class="type-signature"></span>cutTeams(olds, invalids)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>去除群</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含去除后的群列表</li>
<li>去除时按照 <code>teamId</code> 的值去除</li>
<li>此方法内部调用 <a href="global.html#util#.cutObjArray"><code>NIM.util.cutObjArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!olds) {return olds;}
if (!invalids) {return olds;}
if (!NIM.util.isArray(invalids)) { invalids = [invalids]; }
if (!invalids.length) {return olds;}
var options = {
  keyPath: 'teamId'
};
NIM.util.cutObjArray(olds, invalids, options);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.cutObjArray"><code>NIM.util.cutObjArray</code></a> 来去除群</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>olds</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="Team.html">Team</a>></span>



            
            </td>

            

            

            <td class="description last"><p>原始群数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>invalids</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Team.html">Team</a></span>
|

<span class="param-type">Array.&lt;<a href="Team.html">Team</a>></span>



            
            </td>

            

            

            <td class="description last"><p>待去除的群或群数组</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>去除后的群数组</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array.&lt;<a href="Team.html">Team</a>></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="deleteAllLocalMsgs"><span class="type-signature"></span>deleteAllLocalMsgs(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>删除所有本地消息</p>
<ul>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功</li>
<li>此方法同时会清空所有的会话, 请开发者自己清空内存里面的会话列表</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.deleteAllLocalMsgs({
    done: deleteAllLocalMsgsDone
});
function deleteAllLocalMsgsDone(error, obj) {
    console.log(&#x27;删除所有本地消息&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="deleteAllLocalSysMsgs"><span class="type-signature"></span>deleteAllLocalSysMsgs(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>删除所有本地系统通知</p>
<ul>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.deleteAllLocalSysMsgs({
    done: deleteAllLocalSysMsgsDone
});
function deleteAllLocalSysMsgsDone(error, obj) {
    console.log(error);
    console.log(obj);
    console.log(&#x27;删除所有本地系统通知&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;));
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="deleteCollects"><span class="type-signature"></span>deleteCollects(options, done)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>批量删除收藏</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>collectList</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>要删除的收藏列表，每个收藏对象至少要包含<code>id</code>、<code>createTime</code>两个字段；列表长度不能大于100</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数，第一个参数是error，第二个参数有一个属性<code>deleteNum</code>，代表成功删除的个数</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="deleteFriend"><span class="type-signature"></span>deleteFriend(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>删除好友</p>
<ul>
<li><a href="NIM.html#deleteFriend"><code>删除好友</code></a>后, 被删除的人会收到一条类型为<code>'deleteFriend'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为删除方的帐号, <code>to</code>字段的值为被删除方的账号。</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>account</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>要删除好友的账号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>delAlias</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            

            

            <td class="description last"><p>是否要删除好友的备注，默认<code>false</code>不删除</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#deleteFriend"><code>直接加为好友</code></a></li>
			
			<li><a href="NIM.html#applyFriend"><code>申请加为好友</code></a></li>
			
			<li><a href="NIM.html#passFriendApply"><code>通过好友申请</code></a></li>
			
			<li><a href="NIM.html#rejectFriendApply"><code>拒绝好友申请</code></a></li>
			
			<li><a href="NIM.html#updateFriend"><code>更新好友</code></a></li>
			
			<li><a href="NIM.html#getFriends"><code>获取好友列表</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.deleteFriend({
    account: &#x27;account&#x27;,
    delAlias: true,
    done: deleteFriendDone
});
function deleteFriendDone(error, obj) {
    console.log(&#x27;删除好友&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
    if (!error) {
        onDeleteFriend(obj.account);
    }
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="deleteLocalMsg"><span class="type-signature"></span>deleteLocalMsg(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>删除本地消息</p>
<ul>
<li>在<a href="support.html#.db"><code>支持数据库</code></a>时<ul>
<li>如果删除的是对应会话的最后一条消息, 那么对应会话的 <code>lastMsg</code> 属性会自动变为变为上一条消息, 同时触发 <code>onupdatesession</code> 回调</li>
<li>如果对应的消息不存在, 算成功</li>
</ul>
</li>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>msg</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="IMMessage.html">IMMessage</a></span>



            
            </td>

            

            

            <td class="description last"><p>待删除的消息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.deleteLocalMsg({
    msg: msg,
    done: deleteLocalMsgDone
});
function deleteLocalMsgDone(error, obj) {
    console.log(&#x27;删除本地消息&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="deleteLocalMsgs"><span class="type-signature"></span>deleteLocalMsgs(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>根据会话ID、起始时间等条件删除本地消息</p>
<ul>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功</li>
<li>结束时间大于开始时间</li>
<li>如不传开始时间和结束时间，则删除某个会话的所有本地消息 相当于<a href="NIM.html#deleteLocalMsgsBySession"><code>删除某个会话的本地消息</code></a></li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>sessionId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>会话ID</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>start</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>开始时间，毫秒时间戳，默认为负无穷大</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>end</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>结束时间，毫秒时间戳，默认为无穷大</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>updateSession</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否同步更新会话。为<code>true</code>，在删除完消息后SDK会检查是否更新对应会话中的lastMsg；为<code>false</code>，则SDK仅删除本地消息，不更新会话。若开发者确定没有删除最后一定消息，建议传<code>false</code>，减少不必要的检测和更新</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.deleteLocalMsgs({
    sessionId: &#x27;p2p-xx&#x27;,
    start: 1561355358000,
    end: 1561355458000,
    done: deleteLocalMsgsDone
});
function deleteLocalMsgs(error, obj) {
    console.log(&#x27;删除会话本地消息&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="deleteLocalMsgsBySession"><span class="type-signature"></span>deleteLocalMsgsBySession(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>删除某个会话的本地消息</p>
<ul>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>scene</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p><a href="IMMessage.html#.scene"><code>场景</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>to</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>聊天对象, 账号或者群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>delLastMsg</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>是否同时删除本地会话对象中的的lastMsg</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isTag</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>是否为标记删除，若为<code>true</code>，则SDK会记录本地清空会话的时间戳，再调用<a href="NIM.html#getHistoryMsgs"><code>获取历史消息</code></a>或<a href="NIM.html#searchHistoryMsgs"><code>获取包含关键词的历史消息</code></a>接口时，便不能再获取到该时间戳之前的消息了</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.deleteLocalMsgsBySession({
    scene: &#x27;p2p&#x27;,
    to: &#x27;account&#x27;,
    delLastMsg: true,
    done: deleteLocalMsgsBySessionDone
});
function deleteLocalMsgsBySession(error, obj) {
    console.log(&#x27;删除会话本地消息&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="deleteLocalSession"><span class="type-signature"></span>deleteLocalSession(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>删除本地会话</p>
<ul>
<li>在<a href="support.html#.db"><code>支持数据库</code></a>时, 删了本地会话之后, 下次同步就同步不到对应的会话</li>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功</li>
<li>如果对应的会话不存在, 算成功</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>id</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>
|

<span class="param-type">Array.&lt;String></span>



            
            </td>

            

            

            <td class="description last"><p>会话 id 或 id 数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.deleteLocalSession({
    id: &#x27;p2p-account&#x27;,
    done: deleteLocalSessionDone
});
function deleteLocalSessionDone(error, obj) {
    console.log(&#x27;删除本地会话&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="deleteLocalSysMsg"><span class="type-signature"></span>deleteLocalSysMsg(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>删除本地系统通知</p>
<ul>
<li>删除 <code>idServer</code> 对应的本地系统通知</li>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功</li>
<li>如果对应的系统通知不存在, 算成功</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>idServer</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>
|

<span class="param-type">Array.&lt;String></span>



            
            </td>

            

            

            <td class="description last"><p>idServer 或 idServer 数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.deleteLocalSysMsg({
    idServer: &#x27;1234&#x27;,
    done: deleteLocalSysMsgDone
});
function deleteLocalSysMsgDone(error, obj) {
    console.log(error);
    console.log(obj);
    console.log(&#x27;删除本地系统通知&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;));
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="deleteLocalTeam"><span class="type-signature"></span>deleteLocalTeam(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>删除 <code>teamId</code> 对应的本地群</p>
<ul>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功</li>
<li>如果当前用户还在群里面, 那么会失败</li>
<li>如果对应的群不存在, 算成功</li>
<li>如果传了多个 teamId, 但是当前用户还在某个群里面, 那么会失败, 但是所有用户不在的群都会被删掉</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>
|

<span class="param-type">Array.&lt;String></span>



            
            </td>

            

            

            <td class="description last"><p>teamId 或者 teamId 数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.deleteLocalTeam({
    teamId: &#x27;1234&#x27;,
    done: deleteLocalTeamDone
});
function deleteLocalTeamDone(error, obj) {
    console.log(&#x27;删除本地群&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;));
    console.log(error);
    console.log(obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="deleteMsg"><span class="type-signature"></span>deleteMsg(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>撤回消息</p>
<ul>
<li><a href="NIM.html#deleteMsg"><code>撤回消息</code></a>后, 消息接收方会收到一条类型为<code>'deleteMsg'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的 <code>msg</code> 为被删除的消息的部分字段。如果是群消息, 那么群里的所有人都会收到这条系统通知. 如果同时在多个端登录了同一个账号, 那么其它端也会收到这条系统通知.</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>msg</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="IMMessage.html">IMMessage</a></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>待撤回的消息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>apnsText</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>自定义推送文案</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>pushPayload</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>第三方自定义的推送属性，限制json字符串，长度最大2048</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>ps</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>附言</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.deleteMsg({
  msg: someMsg,
  done: deleteMsgDone
})
console.log(&#x27;正在撤回消息&#x27;, someMsg)
function deleteMsgDone (error) {
  console.log(&#x27;撤回消息&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="deleteMsgPin"><span class="type-signature"></span>deleteMsgPin(options, done)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>取消PIN一条消息，即unPin</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>msg</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>要PIN的消息对象</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数，第一个参数是error，代表是否有错</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="deleteMsgSelf"><span class="type-signature"></span>deleteMsgSelf(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>单向删除消息</p>
<ul>
<li>不同与直接删除消息，单向删除消息后，自己看不到删除的消息，但对方仍能看到，也就是仅删除自己这侧的消息</li>
<li>如果存在多端登录，其他端会收到一个单向删除的系统通知</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>msg</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="IMMessage.html">IMMessage</a></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>待删除的消息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>custom</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>扩展字段</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>结果回调函数，第一个参数是error，若为<code>null</code>，则说明删除成功</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="deleteNosAccessToken"><span class="type-signature"></span>deleteNosAccessToken(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>删除NOS安全下载token</p>
<ul>
<li>参见<a href="NIM.html#getNosAccessToken"><code>获取NOS安全下载token</code></a></li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>token</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>需要删除的token</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="deleteQuickComment"><span class="type-signature"></span>deleteQuickComment(options, done)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>删除一个快捷评论</p>
<ul>
<li>不同于消息，评论只有几个简单的字段，可删除，不计入未读数</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>msg</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="IMMessage.html">IMMessage</a></span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>被回复的消息，至少要包含<code>scene</code>, <code>from</code>, <code>to</code>, <code>idServer</code>, <code>idClient</code>, <code>time</code>六个字段</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>body</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>评论的内容，只能是整数，开发者可自定义映射规则，如1点赞的表情、2对应鼓掌的表情等等</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>custom</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>扩展字段</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>needPush</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>是否需要推送</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>needBadge</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>是否需要角标</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>pushTitle</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>推送的标题</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>apnsText</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>自定义推送文案</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>pushPayload</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>第三方自定义的推送属性，限制json字符串，长度最大2048</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数，第一个参数是error，第二个参数返回完整的评论内容和时间戳</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="deleteServerSessions"><span class="type-signature"></span>deleteServerSessions(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>删除服务器上会话列表中的一些会话</p>
<ul>
<li>删除后不可恢复，其他端也不能再拉取到，直至会话重新被产生</li>
<li>删除漫游消息产生的会话请使用<a href="NIM.html#deleteSession"><code>删除会话</code></a>或<a href="NIM.html#deleteSessions"><code>批量删除会话</code></a></li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>sessions</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array</span>



            
            </td>

            

            

            <td class="description last"><p>会话数组，数组项是一个对象，对象必须要包含scene、to两个属性</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>session.scene</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>会话<a href="IMMessage.html#.scene"><code>场景</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>session.to</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>对方账号或群ID</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.deleteServerSessions({
    sessions: [{
        scene: &#x27;p2p&#x27;,
        to: &#x27;account&#x27;
    }, {
        scene: &#x27;p2p&#x27;,
        to: &#x27;account1&#x27;
    }],
    done: function (error, obj) {
       console.log(&#x27;删除会话&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
    }
});</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="deleteSession"><span class="type-signature"></span>deleteSession(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>删除服务器上的漫游会话</p>
<ul>
<li>删了后, 在不<a href="support.html#.db"><code>支持数据库</code></a>时, 下次同步就同步不到对应的会话以及会话对应的漫游消息; 此外, 在新设备上也同步不到对应的会话以及会话对应的漫游消息</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>scene</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p><a href="IMMessage.html#.scene"><code>场景</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>to</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>对方账号或群ID</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#deleteSessions"><code>批量删除服务器上的会话</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.deleteSession({
    scene: &#x27;p2p&#x27;,
    to: &#x27;account&#x27;,
    done: deleteSessionDone
});
function deleteSessionDone(error, obj) {
    console.log(&#x27;删除会话&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="deleteSessions"><span class="type-signature"></span>deleteSessions(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>批量删除服务器上的漫游会话</p>
<ul>
<li>删了服务器上的漫游会话之后, 在不<a href="support.html#.db"><code>支持数据库</code></a>时, 下次同步就同步不到对应的会话以及会话对应的漫游消息; 此外, 在新设备上也同步不到对应的会话以及会话对应的漫游消息</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>sessions</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="Session.html">Session</a>></span>



            
            </td>

            

            

            <td class="description last"><p>会话列表</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#deleteSession"><code>删除会话</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.deleteSessions({
    sessions: [{
        scene: &#x27;p2p&#x27;,
        to: &#x27;account&#x27;
    }, {
        scene: &#x27;p2p&#x27;,
        to: &#x27;account1&#x27;
    }],
    done: deleteSessionsDone
});
function deleteSessionsDone(error, obj) {
    console.log(&#x27;批量删除会话&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="deleteSessionsWithMoreRoaming"><span class="type-signature"></span>deleteSessionsWithMoreRoaming(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>根据id删除漫游消息不全的会话</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>id</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>要删除的会话id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="deleteStickTopSession"><span class="type-signature"></span>deleteStickTopSession(options, done)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>取消会话置顶</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>id</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>取消置顶的会话ID</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数，第一个参数是error，代表是否有错</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="disconnect"><span class="type-signature"></span>disconnect()</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>断开连接（包含登出<a href="NIM.html#logout"><code>logout</code></a>）</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#connect"><code>connect</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.disconnect();</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="dismissTeam"><span class="type-signature"></span>dismissTeam(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>解散群</p>
<ul>
<li><a href="NIM.html#dismissTeam"><code>解散群</code></a>后, 所有<a href="TeamMember.html"><code>群成员</code></a>会收到一条类型为<a href="IMMessage.html#.attach"><code><code>'dismissTeam'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。此类群通知消息的<code>from</code>字段为解散群的人的帐号, <code>to</code>字段的值为被对应的群ID。</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.dismissTeam({
    teamId: &#x27;123&#x27;,
    done: dismissTeamDone
});
function dismissTeamDone(error, obj) {
    console.log(&#x27;解散群&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="findFriend"><span class="type-signature"></span>findFriend(friends, account)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>在好友数组里面根据 <code>account</code> 找到对应的好友</p>
<ul>
<li>此方法内部调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>NIM.util.findObjInArray(friends, {
  keyPath: 'account',
  value: account
});</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来查找某个好友</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>friends</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="Friend.html">Friend</a>></span>



            
            </td>

            

            

            <td class="description last"><p>好友数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>account</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>待查找的好友的 <code>account</code></p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>对应的好友或者 null</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Friend.html">Friend</a></span>
|

<span class="param-type">null</span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="findMsg"><span class="type-signature"></span>findMsg(msgs, idClient)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>在消息数组里面根据 <code>idClient</code> 找到对应的消息</p>
<ul>
<li>此方法内部调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>NIM.util.findObjInArray(msgs, {
  keyPath: 'idClient',
  value: idClient
});</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来查找某个消息</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>msgs</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;Message></span>



            
            </td>

            

            

            <td class="description last"><p>消息数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>idClient</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>待查找的消息的 <code>idClient</code></p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>对应的消息或者 null</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Message</span>
|

<span class="param-type">null</span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="findRelation"><span class="type-signature"></span>findRelation(relations, account)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>在关系数组里面根据 <code>account</code> 找到对应的关系</p>
<ul>
<li>此方法内部调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>NIM.util.findObjInArray(relations, {
  keyPath: 'account',
  value: account
});</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来查找某个关系</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>relations</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="Relation.html">Relation</a>></span>



            
            </td>

            

            

            <td class="description last"><p>关系数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>account</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>待查找的关系的 <code>account</code></p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>对应的关系或者 null</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Relation.html">Relation</a></span>
|

<span class="param-type">null</span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="findSession"><span class="type-signature"></span>findSession(sessions, sessionId)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>在会话数组里面根据 <code>id</code> 找到对应的会话</p>
<ul>
<li>此方法内部调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>NIM.util.findObjInArray(sessions, {
  keyPath: 'id',
  value: sessionId
});</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来查找某个会话</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>sessions</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="Session.html">Session</a>></span>



            
            </td>

            

            

            <td class="description last"><p>会话数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>sessionId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>待查找的会话的 <code>id</code></p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>对应的会话或者 null</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Session.html">Session</a></span>
|

<span class="param-type">null</span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="findSysMsg"><span class="type-signature"></span>findSysMsg(sysMsgs, idServer)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>在系统通知数组里面根据 <code>idServer</code> 找到对应的系统通知</p>
<ul>
<li>此方法内部调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>NIM.util.findObjInArray(sysMsgs, {
  keyPath: 'idServer',
  value: idServer
});</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来查找某个系统通知</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>sysMsgs</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="SystemMessage.html">SystemMessage</a>></span>



            
            </td>

            

            

            <td class="description last"><p>系统通知数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>idServer</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>待查找的系统通知的 <code>idServer</code></p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>对应的系统通知或者 null</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="SystemMessage.html">SystemMessage</a></span>
|

<span class="param-type">null</span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="findTeam"><span class="type-signature"></span>findTeam(teams, teamId)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>在群数组里面根据 <code>teamId</code> 找到对应的群</p>
<ul>
<li>此方法内部调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>NIM.util.findObjInArray(teams, {
  keyPath: 'teamId',
  value: teamId
});</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来查找某个群</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teams</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="Team.html">Team</a>></span>



            
            </td>

            

            

            <td class="description last"><p>群数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>待查找的群的 <code>teamId</code></p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>对应的群或者 null</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Team.html">Team</a></span>
|

<span class="param-type">null</span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="findTeamMember"><span class="type-signature"></span>findTeamMember(members, id)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>在群成员数组里面根据 <code>id</code> 找到对应的群成员</p>
<ul>
<li>此方法内部调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>NIM.util.findObjInArray(members, {
  keyPath: 'id',
  value: id
});</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来查找某个群成员</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>members</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="TeamMember.html">TeamMember</a>></span>



            
            </td>

            

            

            <td class="description last"><p>群成员数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>id</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>待查找的群成员的 <code>id</code></p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>对应的群成员或者 null</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="TeamMember.html">TeamMember</a></span>
|

<span class="param-type">null</span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="findUser"><span class="type-signature"></span>findUser(users, account)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>在名片数组里面根据 <code>account</code> 找到对应的名片</p>
<ul>
<li>此方法内部调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>NIM.util.findObjInArray(users, {
  keyPath: 'account',
  value: account
});</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.findObjInArray"><code>NIM.util.findObjInArray</code></a> 来查找某个名片</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>users</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="User.html">User</a>></span>



            
            </td>

            

            

            <td class="description last"><p>名片数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>account</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>待查找的名片的 <code>account</code></p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>对应的名片或者 null</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="User.html">User</a></span>
|

<span class="param-type">null</span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="forwardMsg"><span class="type-signature"></span>forwardMsg(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>转发消息</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>msg</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="IMMessage.html">IMMessage</a></span>



            
            </td>

            

            

            <td class="description last"><p>待转发的消息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>scene</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>新的<a href="IMMessage.html#.scene"><code>场景</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>to</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>新的接收方, 对方帐号或者群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.forwardMsg({
  msg: someMsg,
  scene: &#x27;p2p&#x27;,
  to: &#x27;account&#x27;,
  done: sendMsgDone
})
console.log(&#x27;正在转发消息&#x27;, someMsg)</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getAllSuperTeamMembers"><span class="type-signature"></span>getAllSuperTeamMembers(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取超大群成员。群成员信息体积太大时，会分多次返回，即options.done会被调用多次，回调函数的第二个参数有一个<code>isAll</code>属性，用来标示是否返回完毕</p>
<ul>
<li>接受入群邀请之后可调用此方法来获取<a href="SuperTeamMember.html"><code>超大群群成员</code></a>列表</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数, 成功时会额外附上<a href="SuperTeamMember.html"><code>群成员</code></a>列表</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#getSuperTeam"><code>获取超大群资料</code></a></li>
			
			<li><a href="NIM.html#getSuperTeams"><code>获取我的超大群资料列表</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getAllSuperTeamMembers({
    teamId: &#x27;123&#x27;,
    done: getAllSuperTeamMembersDone
});
function getAllSuperTeamMembersDone(error, obj) {
    console.log(error);
    console.log(&#x27;获取群成员&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;));
    console.log(&#x27;群成员&#x27;, obj.members)
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getChatroomAddress"><span class="type-signature"></span>getChatroomAddress(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取聊天室服务器地址</p>
<ul>
<li>可以在 IM 连接上获取聊天室服务器地址</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>chatroomId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>聊天室 id</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getChatroomAddress({
    chatroomId: &#x27;chatroomId&#x27;,
    done: getChatroomAddressDone
});
function getChatroomAddressDone(error, obj) {
    console.log(&#x27;获取聊天室地址&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getClientAntispamLexicon"><span class="type-signature"></span>getClientAntispamLexicon()</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取反垃圾词库</p>
<ul>
<li>开发者可以通过此接口获取反垃圾的词库<ul>
<li>通过回调参数，开发者可以检查词库是否合规</li>
<li>回调函数第一个参数为该接口是否有错，第二个参数为词库对象，词库加载后会自动保存在内存中，开发者可以手动传入或者直接使用</li>
</ul>
</li>
</ul>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>反垃圾词库文件file包含</p>
<ul>
<li>version 词库版本</li>
<li>md5 词库文件的md5</li>
<li>nosurl 词库文件的下载地址</li>
<li>thesaurus 词库内容</li>
</ul>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getClientAntispamLexicon({
    done: function(error, file) {
       console.log(error, file)
    }
});</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getCollects"><span class="type-signature"></span>getCollects(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>查询收藏列表</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>type</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>要查询的收藏类型，缺省表示所有类型</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>beginTime</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>时间戳, 开始时间, 精确到ms, 默认为0</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>endTime</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>时间戳, 结束时间, 精确到ms, 默认为服务器的最新时间</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>lastId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>上次查询的最后一条收藏的<code>id</code>, 第一次可不填</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>limit</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    100
                
                </td>
            

            <td class="description last"><p>本次查询的消息数量限制, 最多100条, 默认100条</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>reverse</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>默认<code>false</code>表示从<code>endTime</code>开始往前查找历史消息，<code>true</code>表示从<code>beginTime</code>开始往后查找历史消息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>结果回调函数，其第二个参数有两个属性<code>collectList</code>和<code>total</code>，分别是查到的收藏列表和总数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getFriends"><span class="type-signature"></span>getFriends(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取好友列表</p>
<ul>
<li>如果开发者在<a href="NIM.html"><code>初始化SDK</code></a>的时候设置了<code>syncFriends</code>为<code>false</code>, 那么就收不到<code>onfriends</code>回调, 可以调用此接口来获取好友列表。</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数, 成功的时候会收到<a href="Friend.html"><code>好友</code></a>列表</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#addFriend"><code>直接加为好友</code></a></li>
			
			<li><a href="NIM.html#applyFriend"><code>申请加为好友</code></a></li>
			
			<li><a href="NIM.html#passFriendApply"><code>通过好友申请</code></a></li>
			
			<li><a href="NIM.html#rejectFriendApply"><code>拒绝好友申请</code></a></li>
			
			<li><a href="NIM.html#deleteFriend"><code>删除好友</code></a></li>
			
			<li><a href="NIM.html#updateFriend"><code>更新好友</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getFriends({
    done: getFriendsDone
});
function getFriendsDone(error, friends) {
    console.log(&#x27;获取好友列表&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, friends);
    if (!error) {
        onFriends(friends);
    }
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getHistoryMsgs"><span class="type-signature"></span>getHistoryMsgs(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取云端历史记录</p>
<ul>
<li>该接口用于获取一段时间内的历史消息, 由参数<code>beginTime</code>和<code>endTime</code>来控制时间范围。<ul>
<li>当<code>reverse</code>为<code>false</code>时, 后续查询的<code>endTime</code>对应上次查询的最后一条消息的<code>time</code>字段</li>
<li>当<code>reverse</code>为<code>true</code>时, 后续查询的<code>beginTime</code>对应上次查询的最后一条消息的<code>time</code>字段</li>
</ul>
</li>
<li>如果要搜索历史消息, 请参考<a href="NIM.html#searchHistoryMsgs"><code>获取包含关键词的历史消息</code></a></li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>scene</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>请参考<a href="IMMessage.html#.scene"><code>消息场景</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>to</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>聊天对象, 账号或者群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>beginTime</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>时间戳, 开始时间, 精确到ms, 默认为0</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>endTime</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>时间戳, 结束时间, 精确到ms, 默认为服务器的当前时间</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>lastMsgId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>上次查询的最后一条消息的<code>idServer</code>, 第一次不填</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>limit</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>本次查询的消息数量限制, 最多100条, 默认100条</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>reverse</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>默认<code>false</code>表示从<code>endTime</code>开始往前查找历史消息;<br>                                             <code>true</code>表示从<code>beginTime</code>开始往后查找历史消息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>asc</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>默认<code>false</code>表示返回的消息按时间逆序排序;<br>                                             <code>true</code>表示按时间正序排序</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>msgTypes</code></td>
            

            <td class="type">
            
                
<span class="param-type">StringArray</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    ['text', 'image', ...]
                
                </td>
            

            <td class="description last"><p>消息类型列表，默认全部消息类型</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>结果回调函数, 成功时会额外附上<a href="IMMessage.html"><code>消息</code></a>列表</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getHistoryMsgs({
    scene: &#x27;p2p&#x27;,
    to: &#x27;account&#x27;,
    done: getHistoryMsgsDone
});
function getHistoryMsgsDone(error, obj) {
    console.log(&#x27;获取云端历史记录&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
    if (!error) {
        console.log(obj.msgs);
    }
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getLocalMsgByIdClient"><span class="type-signature"></span>getLocalMsgByIdClient(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取 idClient 对应的本地消息</p>
<ul>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功, 返回 null</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>idClient</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>idClient</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数, 成功时会额外附上<a href="IMMessage.html"><code>消息</code></a></p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getLocalMsgByIdClient({
    idClient: &#x27;d7a1b2c63066e1038e9aa01321652370&#x27;,
    done: getLocalMsgByIdClientDone
});
function getLocalMsgByIdClientDone(error, obj) {
    console.log(&#x27;获取本地消息&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
    if (!error) {
        console.log(obj.msg);
    }
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getLocalMsgs"><span class="type-signature"></span>getLocalMsgs(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取本地历史记录</p>
<ul>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功, 返回空数组</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>sessionId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>如果提供该参数, 那么查询该会话的消息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>start</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description last"><p>开始时间</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>end</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    Infinity
                
                </td>
            

            <td class="description last"><p>结束时间</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>desc</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>true 表示从 end 开始查, false 表示从 begin 开始查</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>limit</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    100
                
                </td>
            

            <td class="description last"><p>limit 数量限制</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>type</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p><a href="IMMessage.html#.type"><code>消息类型</code></a>, [indexedDB专用]如果提供该参数, 那么查询该类型的消息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>types</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>[indexedDB专用]如果提供该参数, 那么查询这几种类型的消息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>keyword</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>[indexedDB专用]如果提供参数, 那么查询匹配该关键词的消息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>filterFunc</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>[indexedDB专用]可选参数, 过滤函数, 接收消息对象, 返回 true 表示结果保留该消息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>结果回调函数, 成功时会附上<a href="IMMessage.html"><code>消息</code></a>列表</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getLocalMsgs({
  sessionId: &#x27;p2p-account&#x27;
  limit: 100,
  done: getLocalMsgsDone
})
function getLocalMsgsDone(error, obj) {
  console.log(&#x27;获取本地消息&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj)
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getLocalMsgsByIdClients"><span class="type-signature"></span>getLocalMsgsByIdClients(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取 idClients 对应的本地消息</p>
<ul>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功, 返回空数组</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>idClients</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>



            
            </td>

            

            

            <td class="description last"><p>idClients</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数, 成功时会额外附上<a href="IMMessage.html"><code>消息</code></a>列表</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getLocalMsgsByIdClients({
    idClients: [
        &#x27;d7a1b2c63066e1038e9aa01321652370&#x27;,
        &#x27;22e604c7811c23586355f63f24658525&#x27;
    ],
    done: getLocalMsgsByIdClientsDone
});
function getLocalMsgsByIdClientsDone(error, obj) {
    console.log(&#x27;获取本地消息&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
    if (!error) {
        console.log(obj.msgs);
    }
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getLocalSession"><span class="type-signature"></span>getLocalSession(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>通过sessionId获取本地会话</p>
<ul>
<li>如果<a href="support.html#.db"><code>支持数据库</code></a>, 则查找数据库中的对应会话，有则返回会话对象，无则返回 null</li>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 则查找之前同步到的会话列表，有则返回会话对象，无则返回 null</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>sessionId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>需要查询的会话的<code>sessionId</code></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getLocalSession({
    sessionId: sessionId,
    done: getLocalSessionDone
});
function getLocalSessionDone(error, obj) {
    console.log(&#x27;获取本地会话操作&#x27; + (!error ? &#x27;完成&#x27; : &#x27;失败&#x27;), error, obj)
    if (!error) {
        onSession(obj);
    }
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getLocalSessions"><span class="type-signature"></span>getLocalSessions(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取本地会话列表</p>
<ul>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 返回空数组</li>
<li>会话列表按时间逆序排列, 即最近聊过天的放在列表的最前面</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>lastSessionId</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>上次查询的最后一条会话的<code>id</code>, 第一次不填</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>limit</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>本次查询的会话数量限制, 最多 100 条, 默认 100 条</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>reverse</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>默认<code>false</code>表示从最近的会话开始往前查找本地会话；<br>                                             <code>true</code>表示从第一条会话开始往后查找本地会话</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getLocalSessions({
    lastSessionId: lastSessionId,
    limit: 100,
    done: getLocalSessionsDone
});
function getLocalSessionsDone(error, obj) {
    console.log(&#x27;获取本地会话列表&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
    if (!error) {
        onSessions(obj.sessions);
    }
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getLocalSessionsByMsgType"><span class="type-signature"></span>getLocalSessionsByMsgType(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取本地会话列表，开发者可以指定排除<code>lastMsg</code>的类型，比如获取每个会话中非通知类型的消息</p>
<ul>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 返回空数组</li>
<li>会话列表按时间逆序排列, 即最近聊过天的放在列表的最前面</li>
<li>与<code>getLocalSessions</code>不同的是，该接口可以排除或指定lastMsg的类型，如当 <code>excludeType='notification'</code> 时，返回的session列表是包含非通知类型消息的会话，该会话的lastMsg为最后一条非通知消息</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>exclude</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>
|

<span class="param-type">Array</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>lastMsg要排除的类型，具体参见<a href="IMMessage.html#.type"><code>消息类型</code></a>，如不填，表示lastMsg不排除任何类型</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getLocalSessionsByMsgType({
    exclude: &#x27;notification&#x27;,
    // exclude: [&#x27;notification&#x27;, &#x27;image&#x27;],
    done: getLocalSessionsByMsgTypeDone
});
function getLocalSessionsByMsgTypeDone(error, obj) {
    console.log(&#x27;获取会话列表&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
    if (!error) {
        onSessions(obj.sessions);
    }
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getLocalSysMsgs"><span class="type-signature"></span>getLocalSysMsgs(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取本地系统通知</p>
<ul>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功, 返回空数组</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>category</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p><a href="SystemMessage.html#.category"><code>种类</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>type</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p><a href="SystemMessage.html#.type"><code>类型</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>read</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>可选</p>
<ul>
<li>如果不传, 默认获取所有已读和未读的系统通知</li>
<li>如果传 <code>true</code>, 那么只获取已读的系统通知</li>
<li>如果传 <code>false</code>, 那么只获取未读的系统通知</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>lastIdServer</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>上次查询的最后一条系统通知的<code>idServer</code>, 第一次不填</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>limit</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>本次查询的消息数量限制, 最多 100 条, 默认 100 条</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>reverse</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>默认<code>false</code>表示从最近的系统通知开始往前查找本地系统通知；<br>                                             <code>true</code>表示从第一条系统通知开始往后查找本地系统通知</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>结果回调函数, 成功时会额外附上<a href="SystemMessage.html"><code>系统通知</code></a>列表</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getLocalSysMsgs({
    lastIdServer: &#x27;lastIdServer&#x27;,
    limit: 100,
    done: getLocalSysMsgsDone
});
function getLocalSysMsgsDone(error, obj) {
    console.log(error);
    console.log(obj);
    console.log(&#x27;获取本地系统通知&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;));
    if (!error) {
        console.log(obj.sysMsgs);
    }
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getLocalTeams"><span class="type-signature"></span>getLocalTeams(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取<code>teamIds</code>对应的本地群</p>
<ul>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamIds</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>



            
            </td>

            

            

            <td class="description last"><p>teamId 数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数, 成功时会额外附上群列表</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getLocalTeams({
    teamIds: teamIds
    done: getLocalTeamsDone
});
function getLocalTeamsDone(error, obj) {
    console.log(&#x27;获取本地群&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;));
    console.log(error);
    console.log(obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getMsgPins"><span class="type-signature"></span>getMsgPins(options, done)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取会话的PIN消息列表</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>id</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>会话ID</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数，第一个参数是error，代表是否有错；第二个参数是返回的PIN消息列表</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getMsgsByIdServer"><span class="type-signature"></span>getMsgsByIdServer(options, done)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>根据idServer批量查询服务器消息</p>
<ul>
<li>主要用于Thread消息场景</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>reqMsgs</code></td>
            

            <td class="type">
            
                
<span class="param-type">ObjectArray</span>



            
            </td>

            

            

            <td class="description last"><p>数组的每个元素都是一个对象，包含<code>scene</code>, <code>from</code>, <code>to</code>, <code>idServer</code>, <code>time</code>五个字段，数组长度最大为100</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数，第一个参数是error，第二个参数返回的具体消息列表</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getMutedTeamMembers"><span class="type-signature"></span>getMutedTeamMembers(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取群禁言成员列表</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>



            
            </td>

            

            

            <td class="description last"><p>群 ID</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getMutedTeamMembers({
  teamId: &#x27;teamId&#x27;,
  done: getMutedTeamMembersDone
})
function getMutedTeamMembersDone (error, obj) {
  console.log(&#x27;获取群禁言成员列表&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;));
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getNosAccessToken"><span class="type-signature"></span>getNosAccessToken(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取NOS安全下载token</p>
<ul>
<li>在上传文件时，若设置参数<code>nosScenes</code>为<code>nim_security_</code>开头的字符串，则需要调用该接口获取token后才能下载文件。<code>nosScenes</code>可在初始化时全局配置，也可在发送、预览某文件时单独设置</li>
<li>下载文件后请及时<a href="NIM.html#deleteNosAccessToken"><code>删除token</code></a>，避免token泄漏</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>文件url</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>userAgent</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>用户user agent</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>ext</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>扩展字段</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>结果回调函数。第一个参数是错误信息，第二个参数是结果对象，它有<code>token</code>和<code>resUrl</code>两个属性，分别是文件token和带有token的最终url（可以用该url直接下载文件）</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getPushNotificationMultiportConfig"><span class="type-signature"></span>getPushNotificationMultiportConfig()</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取当前多端推送配置选项</p>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>多端推送配置选项</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">PushNotificationMultiportConfig</span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getQuickComments"><span class="type-signature"></span>getQuickComments(options, done)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>查询消息的快捷评论列表</p>
<ul>
<li>可批量，即同时查询多个消息的评论列表</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>msgs</code></td>
            

            <td class="type">
            
                
<span class="param-type">IMMessageArray</span>



            
            </td>

            

            

            <td class="description last"><p>被回复的消息，至少要包含<code>scene</code>, <code>from</code>, <code>to</code>, <code>idServer</code>, <code>idClient</code>, <code>time</code>六个字段</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数，第一个参数是error，第二个参数返回完整的评论内容和时间戳</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getRelations"><span class="type-signature"></span>getRelations(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取黑名单和静音列表</p>
<ul>
<li>如果开发者在<a href="NIM.html"><code>初始化SDK</code></a>的时候设置了<code>syncRelations</code>为<code>false</code>, 那么就收不到<code>onblacklist</code>和<code>onmutelist</code>回调, 可以调用此接口来获取黑名单和静音列表。</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数, 成功时会返回黑名单和静音列表</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#addToBlacklist"><code>nim.addToBlacklist</code></a></li>
			
			<li><a href="NIM.html#removeFromBlacklist"><code>nim.removeFromBlacklist</code></a></li>
			
			<li><a href="NIM.html#markInBlacklist"><code>nim.markInBlacklist</code></a></li>
			
			<li><a href="NIM.html#addToMutelist"><code>nim.addToMutelist</code></a></li>
			
			<li><a href="NIM.html#removeFromMutelist"><code>nim.removeFromMutelist</code></a></li>
			
			<li><a href="NIM.html#markInMutelist"><code>nim.markInMutelist</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getRelations({
    done: getRelationsDone
});
function getRelationsDone(error, obj) {
    console.log(&#x27;获取静音列表&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
    if (!error) {
        onBlacklist(obj.blacklist);
        onMutelist(obj.mutelist);
    }
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getServerSession"><span class="type-signature"></span>getServerSession(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取服务器上的某个会话</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>scene</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>会话<a href="IMMessage.html#.scene"><code>场景</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>to</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>对方账号或群ID</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getServerSession({
    scene: &#x27;p2p&#x27;,
    to: &#x27;account&#x27;,
    done: function (obj) {
       console.log(&#x27;获取会话&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
    }
});</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getServerSessions"><span class="type-signature"></span>getServerSessions(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取服务器会话列表</p>
<ul>
<li>与漫游消息构成的会话列表不同，该列表记录的会话数量更多，超过了漫游列表100条的限制，但列表中的会话没有未读数</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>minTimestamp</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description last"><p>最小的时间戳。0表示之前从未请求过。如果之前拉取过会话，可以填写上次的时间戳，拉取自上次之后更新的会话</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>maxTimestamp</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>最大的时间戳。默认是当前时间，表示拉取最新的会话。拉取第一页之后的会话时，填写上一页最后一条会话的更新时间</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>needLastMsg</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否需要lastMsg</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>limit</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    100
                
                </td>
            

            <td class="description last"><p>返回的最大条数，最大100，剩余的可分页获取</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getServerSessions({
    minTimestamp: 1571039417853, // 获取 1571039417853 时间之后更新的会话，增量获取
    maxTimestamp: 1571039418800, // 非第一页，上一页会话列表最小的时间时1571039418800
    done: function (error, obj) {
       console.log(&#x27;获取会话列表&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
    }
});</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getServerTime"><span class="type-signature"></span>getServerTime(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取服务器时间戳（毫秒）</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getServerTime({
    done: getServerTimeDone
});
function getServerTimeDone(error, time) {
    console.log(&#x27;获取服务器时间&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, time);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getSessionsWithMoreRoaming"><span class="type-signature"></span>getSessionsWithMoreRoaming(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>查询漫游消息不全的会话/会话列表</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>id</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>要查询的会话id，若不填，则查询全部</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getStickTopSessions"><span class="type-signature"></span>getStickTopSessions(options, done)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取置顶会话列表</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数，第一个参数是error，代表是否有错</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getSuperTeam"><span class="type-signature"></span>getSuperTeam(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取群信息</p>
<ul>
<li>开发者可以调用此接口根据群ID获取群资料</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数, 成功时会收到<a href="SuperTeam.html"><code>超大群资料</code></a></p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#getSuperTeams"><code>获取群列表</code></a></li>
			
			<li><code>获取群成员</code></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getSuperTeam({
    teamId: &#x27;123&#x27;,
    done: getSuperTeamDone
});
function getSuperTeamDone(error, obj) {
    console.log(error);
    console.log(obj);
    console.log(&#x27;获取群&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;));
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getSuperTeamMembersByJoinTime"><span class="type-signature"></span>getSuperTeamMembersByJoinTime(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>根据进群时间，分页获取超大群成员</p>
<ul>
<li>接受入群邀请之后可调用此方法来分页获取<a href="SuperTeamMember.html"><code>超大群群成员</code></a>列表</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>joinTime</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    0
                
                </td>
            

            <td class="description last"><p>获取在该时间以后进群的群成员</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>limit</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    100
                
                </td>
            

            <td class="description last"><p>本次获取的群成员数量</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>reverse</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>false - 获取joinTime之后进群的群成员，按时间正序排列  true - 获取joinTime之前进群的群成员，按时间逆序排列</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>结果回调函数, 成功时会额外附上<a href="SuperTeamMember.html"><code>群成员</code></a>列表和分页数据（如果有的话）</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#getSuperTeam"><code>获取超大群资料</code></a></li>
			
			<li><a href="NIM.html#getSuperTeams"><code>获取我的超大群资料列表</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getSuperTeamMembersByJoinTime({
    teamId: &#x27;123&#x27;,
    joinTime: 0,
    limit: 100,
    done: onMembers(err, arr)
});
function onMembers (error, arr) {
    console.log(error);
    console.log(&#x27;获取群成员&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;));
    console.log(&#x27;群成员:&#x27;, arr)
    
    var lastmembers = arr &amp;&amp; arr[arr.length - 1]
    if (lastmembers) {
       // 继续获取下一页
       nim.getSuperTeamMembersByJoinTime({
         teamId: &#x27;123&#x27;,
         joinTime: 0,
         limit: 200,
         done: onMembers(err, arr)
       })
    }
    
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getSuperTeams"><span class="type-signature"></span>getSuperTeams(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取所在的超大群列表</p>
<ul>
<li>如果开发者在<a href="NIM.html"><code>初始化SDK</code></a>的时候设置了<code>syncSuperTeams</code>为<code>false</code>, 那么就收不到<code>onSuperTeams</code>回调, 可以调用此接口来获取<a href="SuperTeam.html"><code>超大群</code></a>列表</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数, 成功时会收到<a href="SuperTeam.html"><code>超大群</code></a>列表</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#getSuperTeam"><code>获取超大群资料</code></a></li>
			
			<li><code>获取超大群成员</code></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getSuperTeams({
    done: getSuperTeamsDone
});
function getSuperTeamsDone(error, teams) {
    console.log(error);
    console.log(teams);
    console.log(&#x27;获取超大群列表&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;));
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getTeam"><span class="type-signature"></span>getTeam(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取群</p>
<ul>
<li>开发者可以调用此接口获取群资料</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数, 成功时会收到<a href="Team.html"><code>群资料</code></a></p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#getTeams"><code>获取群列表</code></a></li>
			
			<li><a href="NIM.html#getTeamMembers"><code>获取群成员</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getTeam({
    teamId: &#x27;123&#x27;,
    done: getTeamDone
});
function getTeamDone(error, obj) {
    console.log(error);
    console.log(obj);
    console.log(&#x27;获取群&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;));
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getTeamMemberByTeamIdAndAccount"><span class="type-signature"></span>getTeamMemberByTeamIdAndAccount(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>通过群ID及成员账号获取群成员信息</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>account</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群成员账号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数, 成功时会额外附上<a href="TeamMember.html"><code>群成员</code></a>列表</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#getTeam"><code>获取群资料</code></a></li>
			
			<li><a href="NIM.html#getTeams"><code>获取群列表</code></a></li>
			
			<li><a href="NIM.html#getTeamMembers"><code>获取群成员列表</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getTeamMemberByTeamIdAndAccount({
    teamId: &#x27;123&#x27;,
    account: &#x27;abc&#x27;,
    done: getTeamMemberDone
});
function getTeamMemberDone(error, obj) {
    console.log(error);
    console.log(obj);
    console.log(&#x27;获取群成员&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;));
    if (!error) {
        onTeamMember(obj);
    }
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getTeamMemberInvitorAccid"><span class="type-signature"></span>getTeamMemberInvitorAccid(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取群成员的邀请者accid</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>accounts</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>



            
            </td>

            

            

            <td class="description last"><p>表示需要查询邀请者accid的群成员账号列表，一次最多查200个。当群成员数量小于等于200时为可选参数，不填默认查全部成员；群成员数量大于200时，需要将成员列表分批多次调用此接口查询。</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数，返回数据类型为Object，key/value分别是群成员accid/邀请者accid</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#getTeams"><code>获取群列表</code></a></li>
			
			<li><a href="NIM.html#getTeamMembers"><code>获取群成员列表</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getTeamMemberInvitorAccid({
    teamId: &#x27;123&#x27;,
    account: [&#x27;abc&#x27;],
    done: getTeamMemberInvitorAccidDone
});
function getTeamMemberInvitorAccidDone(error, obj) {
    console.log(error);
    console.log(obj);
    console.log(&#x27;获取群成员邀请者&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;));
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getTeamMembers"><span class="type-signature"></span>getTeamMembers(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取群成员</p>
<ul>
<li>如果开发者在<a href="NIM.html"><code>初始化SDK</code></a>时选择设置了<code>syncTeamMembers</code>为<code>false</code>, 那么就收不到<code>onteammembers</code>回调, 可以调用此方法来获取<a href="TeamMember.html"><code>群成员</code></a>列表</li>
<li>接受入群邀请之后调用此方法来获取<a href="TeamMember.html"><code>群成员</code></a>列表</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数, 成功时会额外附上<a href="TeamMember.html"><code>群成员</code></a>列表</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#getTeam"><code>获取群资料</code></a></li>
			
			<li><a href="NIM.html#getTeams"><code>获取群列表</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getTeamMembers({
    teamId: &#x27;123&#x27;,
    done: getTeamMembersDone
});
function getTeamMembersDone(error, obj) {
    console.log(error);
    console.log(obj);
    console.log(&#x27;获取群成员&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;));
    if (!error) {
        onTeamMembers(obj);
    }
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getTeamMsgReadAccounts"><span class="type-signature"></span>getTeamMsgReadAccounts(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>查询群组已读、未读账号列表</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamMsgReceipt</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;Object></span>



            
            </td>

            

            

            <td class="description last"><p>已读消息对象</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群序号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>idServer</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>消息编号</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getTeamMsgReadAccounts({
  teamMsgReceipt: {
     teamId: &#x27;1027484&#x27;,
     idServer: &#x27;68953284018302&#x27;
  },
  done: getTeamMsgReadAccountsDone
})
function getTeamMsgReadAccountsDone (error, obj) {
  console.log(&#x27;查询群组已读、未读账号列表&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;));
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getTeamMsgReads"><span class="type-signature"></span>getTeamMsgReads(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>查询群组消息已读、未读数量</p>
<ul>
<li>对应于群组消息发送时配置了<code>needMsgReceipt</code>字段的群组消息，接收方可以对消息发送已读回执</li>
<li><code>done</code> 回调的第二个参数是发送的参数，用于校验，第三个参数才是实际的结果</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamMsgReceipts</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;Object></span>



            
            </td>

            

            

            <td class="description last"><p>已读消息对象</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>teamMsgReceipt.teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群序号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>teamMsgReceipt.idServer</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>消息编号</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getTeamMsgReads({
  teamMsgReceipts: [{
     teamId: &#x27;1027484&#x27;,
     idServer: &#x27;68953284018302&#x27;
  }],
  done: getTeamMsgReadsDone
})
function getTeamMsgReadsDone (error, params, result) {
  console.log(&#x27;查询群组消息已读、未读数量&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;));
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getTeams"><span class="type-signature"></span>getTeams(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取群列表</p>
<ul>
<li>如果开发者在<a href="NIM.html"><code>初始化SDK</code></a>的时候设置了<code>syncTeams</code>为<code>false</code>, 那么就收不到<code>onteams</code>回调, 可以调用此接口来获取<a href="Team.html"><code>群</code></a>列表</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数, 成功时会收到<a href="Team.html"><code>群</code></a>列表</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#getTeam"><code>获取群资料</code></a></li>
			
			<li><a href="NIM.html#getTeamMembers"><code>获取群成员</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getTeams({
    done: getTeamsDone
});
function getTeamsDone(error, teams) {
    console.log(error);
    console.log(teams);
    console.log(&#x27;获取群列表&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;));
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getThreadMsgs"><span class="type-signature"></span>getThreadMsgs(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取某thread的消息列表</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>scene</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>对方账号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>threadMsgFromAccount</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>thread根消息的<code>from</code>，即发送者账号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>threadMsgToAccount</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>thread根消息的<code>to</code>，即接受者账号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>threadMsgIdServer</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>thread根消息的<code>idServer</code></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>threadMsgTime</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>thread根消息的<code>time</code></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>beginTime</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>时间戳, 开始时间, 精确到ms, 默认为0</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>endTime</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>时间戳, 结束时间, 精确到ms, 默认为服务器的当前时间</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>lastMsgId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>上次查询的最后一条消息的<code>idServer</code>, 第一次不填</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>limit</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    100
                
                </td>
            

            <td class="description last"><p>本次查询的消息数量限制, 最多100条, 默认100条</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>reverse</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>默认<code>false</code>表示从<code>endTime</code>开始往前查找历史消息，<code>true</code>表示从<code>beginTime</code>开始往后查找历史消息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getUser"><span class="type-signature"></span>getUser(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取用户名片</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>account</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>账号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数, 成功时会返回用户名片</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#getUser"><code>获取用户名片</code></a></li>
			
			<li><a href="NIM.html#getUsers"><code>获取用户名片数组</code></a></li>
			
			<li><a href="NIM.html#updateMyInfo"><code>更新登录用户的名片</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getUser({
    account: &#x27;account&#x27;,
    done: getUserDone
});
function getUserDone(error, user) {
    console.log(&#x27;获取用户名片&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
    if (!error &amp;&amp; user) {
        onUsers(user);
    }
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="getUsers"><span class="type-signature"></span>getUsers(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取用户名片数组</p>
<ul>
<li>每次最多 150 个</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>accounts</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>



            
            </td>

            

            

            <td class="description last"><p>账号数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数, 成功时会返回用户名片列表</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#getUser"><code>获取用户名片</code></a></li>
			
			<li><a href="NIM.html#getUsers"><code>获取用户名片数组</code></a></li>
			
			<li><a href="NIM.html#updateMyInfo"><code>更新登录用户的名片</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.getUsers({
    accounts: [&#x27;account1&#x27;, &#x27;account2&#x27;],
    done: getUsersDone
});
function getUsersDone(error, users) {
    console.log(&#x27;获取用户名片数组&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, users);
    if (!error &amp;&amp; users.length) {
        onUsers(users);
    }
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="insertLocalSession"><span class="type-signature"></span>insertLocalSession(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>插入一条本地会话记录</p>
<ul>
<li>如果会话已存在, 那么会返回错误</li>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 那么算成功</li>
<li>如果有对应会话的本地历史消息, 那么会更新会话的 <code>lastMsg</code> 为最后一条消息</li>
<li>插入成功后, 会触发<code>onupdatesession</code>回调</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>scene</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p><a href="Session.html"><code>会话</code></a><a href="IMMessage.html#.scene"><code>场景</code></a></p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>option.to</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p><a href="Session.html"><code>会话</code></a>对象, 账号或群ID</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options.updateTime</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>可选, 会话更新的时间, 如果不填, SDK 会设置一个比当前所有会话更新时间大的一个时间</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options.done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>结果回调函数, 如果成功会额外附上生成的会话对象</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.insertLocalSession({
    scene: &#x27;p2p&#x27;,
    to: &#x27;account&#x27;,
    done: insertLocalSessionDone
});
function insertLocalSessionDone(error, obj) {
    console.log(&#x27;插入本地会话记录&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
    if (!error) {
        onSessions(obj.session);
    }
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="interlaceImage"><span class="type-signature"></span>interlaceImage(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>interlace 图片</p>
<ul>
<li>只支持通过<a href="NIM.html#previewFile"><code>预览文件</code></a>或<a href="NIM.html#sendFile"><code>发送文件消息</code></a>拿到的图片 url, 或者经过其他图片操作后拿到的图片 url</li>
<li>在网络环境较差时, interlace 后的图片会以从模糊到清晰的方式呈现给用户</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>原图 url</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数, 成功时附上 interlace 后的图片 url</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">var url = &#x27;http://nim.nos.netease.com/MTAxMTAwMg==/bmltYV8xNDc5OTNfMTQ0MzE0NTgyNDI0M184YjFkYTMwMS02NjcxLTRiYjktYTUwZC04ZTVlZjZlNzZjMzA=&#x27;;
var interlaceUrl = nim.interlaceImage({
    url: url,
    done: interlaceImageDone
});
function interlaceImageDone(error, obj) {
    console.log(&#x27;interlace 图片&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="isMsgRemoteRead"><span class="type-signature"></span>isMsgRemoteRead(msg)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>查询消息是否被对方读过了</p>
<ul>
<li>目前只支持<a href="IMMessage.html#.scene"><code>'p2p'</code></a>会话</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>msg</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="IMMessage.html">IMMessage</a></span>



            
            </td>

            

            

            <td class="description last"><p>消息</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>是否被对方读过</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Boolean</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">var isRemoteRead = nim.isMsgRemoteRead(msg);</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="kick"><span class="type-signature"></span>kick(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>踢当前用户登录的其它端</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>deviceIds</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>



            
            </td>

            

            

            <td class="description last"><p>要踢掉的端的设备号数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数, 成功时会收到被踢掉的设备号数组</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.kick({
    deviceIds: [&#x27;device1&#x27;],
    done: onKick
});
function onKick(error, obj) {
    console.log(&#x27;踢其它端&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;));
    console.log(error);
    console.log(obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="leaveSuperTeam"><span class="type-signature"></span>leaveSuperTeam(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>主动退群</p>
<ul>
<li><a href="NIM.html#leaveSuperTeam"><code>主动退群</code></a>后, 所有<a href="SuperTeamMember.html"><code>超大群群成员</code></a>会收到一条类型为<a href="IMMessage.html#.attach"><code><code>'leaveSuperTeam'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。此类群通知消息的<code>from</code>字段的值为退群的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="SuperTeam.html"><code>超大群对象</code></a>。</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.leaveSuperTeam({
    teamId: &#x27;123&#x27;,
    done: leaveSuperTeamDone
});
function leaveSuperTeamDone(error, obj) {
    console.log(&#x27;主动退群&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="leaveTeam"><span class="type-signature"></span>leaveTeam(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>主动退群</p>
<ul>
<li><a href="NIM.html#leaveTeam"><code>主动退群</code></a>后, 所有<a href="TeamMember.html"><code>群成员</code></a>会收到一条类型为<a href="IMMessage.html#.attach"><code><code>'leaveTeam'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。此类群通知消息的<code>from</code>字段的值为退群的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="Team.html"><code>群对象</code></a>。</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.leaveTeam({
    teamId: &#x27;123&#x27;,
    done: leaveTeamDone
});
function leaveTeamDone(error, obj) {
    console.log(&#x27;主动退群&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="logout"><span class="type-signature"></span>logout()</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>登出SDK</p>
<ul>
<li>在连接正常的情况下，可以调用该方法退出登录，如果您不确定连接是否正常，请使用<a href="NIM.html#connect"><code>connect</code></a></li>
</ul>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#connect"><code>connect</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.logout();</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="markInBlacklist"><span class="type-signature"></span>markInBlacklist(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>加入黑名单/从黑名单移除</p>
<ul>
<li>此接口可以完成以下两个功能, 通过参数<code>isAdd</code>来决定实际的功能<ul>
<li><code>isAdd</code>为<code>true</code>时, 会将<code>account</code><a href="NIM.html#addToBlacklist"><code>加入黑名单</code></a><ul>
<li>如果一个用户被加入了黑名单, 那么就不再会收到此用户发送的消息</li>
</ul>
</li>
<li><code>isAdd</code>为<code>false</code>时, 会将<code>account</code><a href="NIM.html#removeFromBlacklist"><code>从黑名单移除</code></a><ul>
<li>如果一个用户被从黑名单移除, 那么会重新收到此用户发送的消息</li>
</ul>
</li>
</ul>
</li>
<li>每个功能SDK都提供了相应的独立接口</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>account</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>要加入黑名单/从黑名单移除的账号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isAdd</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            

            

            <td class="description last"><p><code>true</code>表示加入黑名单, <code>false</code>表示从黑名单移除</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#addToBlacklist"><code>nim.addToBlacklist</code></a></li>
			
			<li><a href="NIM.html#removeFromBlacklist"><code>nim.removeFromBlacklist</code></a></li>
			
			<li><a href="NIM.html#getRelations"><code>nim.getRelations</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.markInBlacklist({
    account: &#x27;account&#x27;,
    // &#x60;true&#x60;表示加入黑名单, &#x60;false&#x60;表示从黑名单移除
    isAdd: true,
    done: markInBlacklistDone
});
function markInBlacklistDone(error, obj) {
    console.log(&#x27;将&#x27; + obj.account + (isAdd ? &#x27;加入黑名单&#x27; : &#x27;从黑名单移除&#x27;) + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
    if (!error) {
        onMarkInBlacklist(obj);
    }
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="markInMutelist"><span class="type-signature"></span>markInMutelist(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>加入静音列表/从静音列表移除</p>
<ul>
<li>此接口可以完成以下两个功能, 通过参数<code>isAdd</code>来决定实际的功能<ul>
<li><code>isAdd</code>为<code>true</code>时, 会将<code>account</code><a href="NIM.html#addToMutelist"><code>加入静音列表</code></a></li>
<li><code>isAdd</code>为<code>false</code>时, 会将<code>account</code><a href="NIM.html#removeFromMutelist"><code>从静音列表移除</code></a></li>
</ul>
</li>
<li>每个功能SDK都提供了相应的独立接口</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>account</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>要加入静音列表/从静音列表移除的账号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isAdd</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            

            

            <td class="description last"><p><code>true</code>表示加入静音列表, <code>false</code>表示从静音列表移除</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#addToMutelist"><code>nim.addToMutelist</code></a></li>
			
			<li><a href="NIM.html#removeFromMutelist"><code>nim.removeFromMutelist</code></a></li>
			
			<li><a href="NIM.html#getRelations"><code>nim.getRelations</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.markInMutelist({
    account: &#x27;account&#x27;,
    // &#x60;true&#x60;表示加入静音列表, &#x60;false&#x60;表示从静音列表移除
    isAdd: &#x27;true&#x27;,
    done: markInMutelistDone
});
function markInMutelistDone(error, obj) {
    console.log(&#x27;将&#x27; + obj.account + (isAdd ? &#x27;加入静音列表&#x27; : &#x27;从静音列表移除&#x27;) + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
    if (!error) {
        onMarkInMutelist(obj);
    }
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="markMsgRead"><span class="type-signature"></span>markMsgRead(msgs)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>标记消息为已收到</p>
<ul>
<li>如果没有消息、或者支持数据库、或者设置了自动标记, 那么直接返回</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>msgs</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="IMMessage.html">IMMessage</a>></span>



            
            </td>

            

            

            <td class="description last"><p>待标记的消息或者消息数组</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.markMsgRead(someMsg);
// or
nim.markMsgRead([someMsg]);</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="markSysMsgRead"><span class="type-signature"></span>markSysMsgRead(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>标记系统通知为已收到</p>
<ul>
<li>SDK 在收到系统通知后会更新系统通知未读数, 开发者需要调用此接口来通知 SDK 将某条系统通知标记为已读状态, 标记后会触发<code>onupdatesysmsgunread</code>回调</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>sysMsgs</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SystemMessage.html">SystemMessage</a></span>
|

<span class="param-type">Array.&lt;<a href="SystemMessage.html">SystemMessage</a>></span>



            
            </td>

            

            

            <td class="description last"><p>通过<code>onofflinesysmsgs</code>或者<code>onsysmsg</code>接收到的系统通知或者系统通知数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.markSysMsgRead({
    sysMsgs: someSysMsg,
    done: markSysMsgReadDone
});
function markSysMsgReadDone(error, obj) {
    console.log(error);
    console.log(obj);
    console.log(&#x27;标记系统通知为已收到&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;));
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="mergeFriends"><span class="type-signature"></span>mergeFriends(olds, news)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>合并好友</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含合并后的好友列表</li>
<li>合并时按照 <code>account</code> 的值去重，按照 <code>account</code> 的值正序排序</li>
<li>此方法内部调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!olds) {olds = [];}
if (!news) {return olds;}
if (!NIM.util.isArray(news)) { news = [news]; }
if (!news.length) {return olds;}
var options = {
  keyPath: 'account'
};
NIM.util.mergeObjArray([], olds, news, options);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来合并好友</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>olds</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="Friend.html">Friend</a>></span>



            
            </td>

            

            

            <td class="description last"><p>原始好友数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>news</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Friend.html">Friend</a></span>
|

<span class="param-type">Array.&lt;<a href="Friend.html">Friend</a>></span>



            
            </td>

            

            

            <td class="description last"><p>待合并的好友或好友数组</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>合并后的好友数组</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array.&lt;<a href="Friend.html">Friend</a>></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="mergeLoginPorts"><span class="type-signature"></span>mergeLoginPorts(olds, news)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>合并登录端</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含合并后的登录端列表</li>
<li>合并时按照 <code>deviceId</code> 的值去重，按照 <code>deviceId</code> 的值正序排序</li>
<li>此方法内部调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!olds) {olds = [];}
if (!news) {return olds;}
if (!NIM.util.isArray(news)) { news = [news]; }
if (!news.length) {return olds;}
var options = {
  keyPath: 'deviceId'
};
NIM.util.mergeObjArray([], olds, news, options);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来合并登录端</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>olds</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="LoginPort.html">LoginPort</a>></span>



            
            </td>

            

            

            <td class="description last"><p>原始登录端数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>news</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="LoginPort.html">LoginPort</a></span>
|

<span class="param-type">Array.&lt;<a href="LoginPort.html">LoginPort</a>></span>



            
            </td>

            

            

            <td class="description last"><p>待合并的登录端或登录端数组</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>合并后的登录端数组</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array.&lt;<a href="LoginPort.html">LoginPort</a>></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="mergeMsgs"><span class="type-signature"></span>mergeMsgs(olds, news)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>合并消息</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含合并后的消息列表</li>
<li>合并时按照 <code>idClient</code> 的值去重，按照 <code>time</code> 的值排序</li>
<li>此方法内部调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!olds) {olds = [];}
if (!news) {return olds;}
if (!NIM.util.isArray(news)) { news = [news]; }
if (!news.length) {return olds;}
var options = {
  keyPath: 'idClient',
  sortPath: 'time'
};
NIM.util.mergeObjArray([], olds, news, options);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来合并消息</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>olds</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;Message></span>



            
            </td>

            

            

            <td class="description last"><p>原始消息数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>news</code></td>
            

            <td class="type">
            
                
<span class="param-type">Message</span>
|

<span class="param-type">Array.&lt;Message></span>



            
            </td>

            

            

            <td class="description last"><p>待合并的消息或消息数组</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>合并后的消息数组</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array.&lt;Message></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="mergeRelations"><span class="type-signature"></span>mergeRelations(olds, news)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>合并关系</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含合并后的关系列表</li>
<li>合并时按照 <code>account</code> 的值去重，按照 <code>account</code> 的值正序排序</li>
<li>此方法内部调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!olds) {olds = [];}
if (!news) {return olds;}
if (!NIM.util.isArray(news)) { news = [news]; }
if (!news.length) {return olds;}
var options = {
  keyPath: 'account'
};
NIM.util.mergeObjArray([], olds, news, options);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来合并关系</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>olds</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="Relation.html">Relation</a>></span>



            
            </td>

            

            

            <td class="description last"><p>原始关系数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>news</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Relation.html">Relation</a></span>
|

<span class="param-type">Array.&lt;<a href="Relation.html">Relation</a>></span>



            
            </td>

            

            

            <td class="description last"><p>待合并的关系或关系数组</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>合并后的关系数组</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array.&lt;<a href="Relation.html">Relation</a>></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="mergeSessions"><span class="type-signature"></span>mergeSessions(olds, news)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>合并会话</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含合并后的会话列表</li>
<li>合并时按照 <code>id</code> 的值去重，按照 <code>updateTime</code> 的值倒序排序</li>
<li>此方法内部调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!olds) {olds = [];}
if (!news) {return olds;}
if (!NIM.util.isArray(news)) { news = [news]; }
if (!news.length) {return olds;}
var options = {
  sortPath: 'updateTime',
  desc: true
};
NIM.util.mergeObjArray([], olds, news, options);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来合并会话</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>olds</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="Session.html">Session</a>></span>



            
            </td>

            

            

            <td class="description last"><p>原始会话数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>news</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Session.html">Session</a></span>
|

<span class="param-type">Array.&lt;<a href="Session.html">Session</a>></span>



            
            </td>

            

            

            <td class="description last"><p>待合并的会话或会话数组</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>合并后的会话数组</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array.&lt;<a href="Session.html">Session</a>></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="mergeSysMsgs"><span class="type-signature"></span>mergeSysMsgs(olds, news)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>合并系统通知</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含合并后的系统通知列表</li>
<li>合并时按照 <code>idServer</code> 的值去重，按照 <code>idServer</code> 的值倒序排序</li>
<li>此方法内部调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!olds) {olds = [];}
if (!news) {return olds;}
if (!NIM.util.isArray(news)) { news = [news]; }
if (!news.length) {return olds;}
var options = {
  keyPath: 'idServer',
  desc: true
};
NIM.util.mergeObjArray([], olds, news, options);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来合并系统通知</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>olds</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="SystemMessage.html">SystemMessage</a>></span>



            
            </td>

            

            

            <td class="description last"><p>原始系统通知数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>news</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SystemMessage.html">SystemMessage</a></span>
|

<span class="param-type">Array.&lt;<a href="SystemMessage.html">SystemMessage</a>></span>



            
            </td>

            

            

            <td class="description last"><p>待合并的系统通知或系统通知数组</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>合并后的系统通知数组</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array.&lt;<a href="SystemMessage.html">SystemMessage</a>></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="mergeTeamMembers"><span class="type-signature"></span>mergeTeamMembers(olds, news)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>合并群成员</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含合并后的群成员列表</li>
<li>合并时按照 <code>id</code> 的值去重，按照 <code>id</code> 的值正序排序</li>
<li>此方法内部调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!olds) {olds = [];}
if (!news) {return olds;}
if (!NIM.util.isArray(news)) { news = [news]; }
if (!news.length) {return olds;}
var options = {
};
NIM.util.mergeObjArray([], olds, news, options);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来合并群成员</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>olds</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="TeamMember.html">TeamMember</a>></span>



            
            </td>

            

            

            <td class="description last"><p>原始群成员数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>news</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="TeamMember.html">TeamMember</a></span>
|

<span class="param-type">Array.&lt;<a href="TeamMember.html">TeamMember</a>></span>



            
            </td>

            

            

            <td class="description last"><p>待合并的群成员或群成员数组</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>合并后的群成员数组</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array.&lt;<a href="TeamMember.html">TeamMember</a>></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="mergeTeams"><span class="type-signature"></span>mergeTeams(olds, news)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>合并群</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含合并后的群列表</li>
<li>合并时按照 <code>teamId</code> 的值去重，按照 <code>teamId</code> 的值正序排序</li>
<li>此方法内部调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!olds) {olds = [];}
if (!news) {return olds;}
if (!NIM.util.isArray(news)) { news = [news]; }
if (!news.length) {return olds;}
var options = {
  keyPath: 'teamId'
};
NIM.util.mergeObjArray([], olds, news, options);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来合并群</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>olds</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="Team.html">Team</a>></span>



            
            </td>

            

            

            <td class="description last"><p>原始群数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>news</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Team.html">Team</a></span>
|

<span class="param-type">Array.&lt;<a href="Team.html">Team</a>></span>



            
            </td>

            

            

            <td class="description last"><p>待合并的群或群数组</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>合并后的群数组</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array.&lt;<a href="Team.html">Team</a>></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="mergeUsers"><span class="type-signature"></span>mergeUsers(olds, news)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>合并名片</p>
<ul>
<li>此方法不会改变参数的值，而是会返回新的数组，包含合并后的名片列表</li>
<li>合并时按照 <code>account</code> 的值去重，按照 <code>account</code> 的值正序排序</li>
<li>此方法内部调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来完成实际工作<pre class="prettyprint source"><code>if (!olds) {olds = [];}
if (!news) {return olds;}
if (!NIM.util.isArray(news)) { news = [news]; }
if (!news.length) {return olds;}
var options = {
  keyPath: 'account'
};
NIM.util.mergeObjArray([], olds, news, options);</code></pre></li>
<li>如果此方法不满足开发者的业务需求，那么开发者可以根据自己的业务需求调用 <a href="global.html#util#.mergeObjArray"><code>NIM.util.mergeObjArray</code></a> 来合并名片</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>olds</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="User.html">User</a>></span>



            
            </td>

            

            

            <td class="description last"><p>原始名片数组</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>news</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="User.html">User</a></span>
|

<span class="param-type">Array.&lt;<a href="User.html">User</a>></span>



            
            </td>

            

            

            <td class="description last"><p>待合并的名片或名片数组</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>合并后的名片数组</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array.&lt;<a href="User.html">User</a>></span>



    </dd>
</dl>


        

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="muteTeamAll"><span class="type-signature"></span>muteTeamAll(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>群组禁言</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>待禁言群的群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>mute</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            

            

            <td class="description last"><p>是否禁言</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.muteTeamAll({
  teamId: &#x27;1027484&#x27;,
  mute: 1,
  done: muteTeamAllDone
})
function muteTeamAllDone (error, obj) {
  console.log(&#x27;禁言群&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;));
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="notifyForNewTeamMsg"><span class="type-signature"></span>notifyForNewTeamMsg(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>是否需要群消息通知</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamIds</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>



            
            </td>

            

            

            <td class="description last"><p>群列表</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数，成功时第二个参数是一个map, key是群ID, value 是一个布尔值, 表示该群是否需要群消息通知；如果有部分成功部分失败，第三个参数是失败的群ID数组</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.notifyForNewTeamMsg({
    teamIds: [&#x27;123&#x27;],
    done: notifyForNewTeamMsgDone
})
function notifyForNewTeamMsgDone(error, map) {
    console.log(error);
    console.log(map);
    console.log(&#x27;查询是否需要群消息通知&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;));
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="packFileDownloadName"><span class="type-signature"></span>packFileDownloadName(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>修改图片下载的名字</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>原图 url</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>name</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>下载的名字</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>修改图片下载名字后的图片 url</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">String</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">var url = &#x27;http://nim.nos.netease.com/MTAxMTAwMg==/bmltYV8xNDc5OTNfMTQ0MzE0NTgyNDI0M184YjFkYTMwMS02NjcxLTRiYjktYTUwZC04ZTVlZjZlNzZjMzA=&#x27;;
var nameUrl = nim.packFileDownloadName({
    url: url,
    name: &#x27;测试.jpg&#x27;
});
console.log(nameUrl);</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="passFriendApply"><span class="type-signature"></span>passFriendApply(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>通过好友申请</p>
<ul>
<li><a href="NIM.html#applyFriend"><code>申请加某个用户为好友</code></a>后, 对方会收到一条类型为<code>'applyFriend'</code>的<a href="SystemMessage.html#.type"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为申请方的帐号, <code>to</code>字段的值为接收方的账号, 用户在收到好友申请后, 可以选择通过或者拒绝好友申请。<ul>
<li>如果<a href="NIM.html#passFriendApply"><code>通过好友申请</code></a>, 那么申请方会收到一条类型为<code>'passFriendApply'</code>的<a href="SystemMessage.html#.type"><code>系统通知</code></a>, 此类群通知消息的<code>from</code>字段的值为通过方的帐号, <code>to</code>字段的值为申请方的账号。</li>
<li>如果<a href="NIM.html#rejectFriendApply"><code>拒绝好友申请</code></a>, 那么申请方会收到一条类型为<code>'rejectFriendApply'</code>的<a href="SystemMessage.html#.type"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为拒绝方的帐号, <code>to</code>字段的值为申请方的账号。</li>
</ul>
</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>idServer</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>对应的系统通知的 <code>idServer</code></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>account</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>要通过好友申请的账号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>ps</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>附言, 选填, 开发者也可以使用JSON格式的字符串来扩展此内容</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#passFriendApply"><code>直接加为好友</code></a></li>
			
			<li><a href="NIM.html#applyFriend"><code>申请加为好友</code></a></li>
			
			<li><a href="NIM.html#rejectFriendApply"><code>拒绝好友申请</code></a></li>
			
			<li><a href="NIM.html#deleteFriend"><code>删除好友</code></a></li>
			
			<li><a href="NIM.html#updateFriend"><code>更新好友</code></a></li>
			
			<li><a href="NIM.html#getFriends"><code>获取好友列表</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">// 假设 sysMsg 是通过回调 &#x60;onsysmsg&#x60; 收到的系统通知
nim.passFriendApply({
    idServer: sysMsg.idServer,
    account: &#x27;account&#x27;,
    ps: &#x27;ps&#x27;,
    done: passFriendApplyDone
});
function passFriendApplyDone(error, obj) {
    console.log(&#x27;通过好友申请&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
    if (!error) {
        onAddFriend(obj.friend);
    }
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="passSuperTeamApply"><span class="type-signature"></span>passSuperTeamApply(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>通过入群申请</p>
<ul>
<li>用户<a href="NIM.html#applySuperTeam"><code>申请加入高级群</code></a>后, 目标群的群主和管理员会收到一条类型为<code>'applySuperTeam'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>，可调用该方法通过该用户的入群申请</li>
<li>通过入群申请后，该群的所有群成员会收到一条类型为<code>'passSuperTeamApply'</code>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>, 此类群通知消息的<code>from</code>字段的值为通过入群申请的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="SuperTeam.html"><code>群对象</code></a>, <code>attach</code>有一个字段<code>account</code>包含了申请方的帐号, <code>attach</code>有一个字段<code>members</code>的值为被通过申请的群成员列表。</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>idServer</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>对应的系统通知的 <code>idServer</code></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群ID</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>from</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>申请方的帐号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#applySuperTeam"><code>申请入群</code></a></li>
			
			<li><a href="NIM.html#rejectSuperTeamApply"><code>拒绝入群申请</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">// 假设 sysMsg 是通过回调 &#x60;onsysmsg&#x60; 收到的系统通知
nim.passSuperTeamApply({
    idServer: sysMsg.idServer,
    teamId: &#x27;123&#x27;,
    from: &#x27;a2&#x27;,
    done: passSuperTeamApplyDone
});
function passSuperTeamApplyDone(error, obj) {
    console.log(&#x27;通过入群申请&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="passTeamApply"><span class="type-signature"></span>passTeamApply(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>通过入群申请</p>
<ul>
<li>用户可以主动<a href="NIM.html#applyTeam"><code>申请加入高级群</code></a>, 目标群的群主和管理员会收到一条类型为<code>'applyTeam'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为申请方的帐号, <code>to</code>字段的值为对应的群ID, 高级群的群主和管理员在收到入群申请后, 可以选择通过或者拒绝入群申请。<ul>
<li>如果<a href="NIM.html#passTeamApply"><code>通过入群申请</code></a>, 那么该群的所有群成员会收到一条类型为<code>'passTeamApply'</code>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>, 此类群通知消息的<code>from</code>字段的值为通过入群申请的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="Team.html"><code>群对象</code></a>, <code>attach</code>有一个字段<code>account</code>包含了申请方的帐号, <code>attach</code>有一个字段<code>members</code>的值为被通过申请的群成员列表。</li>
<li>如果<a href="NIM.html#rejectTeamApply"><code>拒绝入群申请</code></a>, 那么申请人会收到一条类型为<code>'rejectTeamApply'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为拒绝方的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="Team.html"><code>群</code></a>。</li>
</ul>
</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>idServer</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>对应的系统通知的 <code>idServer</code></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群ID</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>from</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>申请方的帐号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#applyTeam"><code>申请入群</code></a></li>
			
			<li><a href="NIM.html#rejectTeamApply"><code>拒绝入群申请</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">// 假设 sysMsg 是通过回调 &#x60;onsysmsg&#x60; 收到的系统通知
nim.passTeamApply({
    idServer: sysMsg.idServer,
    teamId: &#x27;123&#x27;,
    from: &#x27;a2&#x27;,
    done: passTeamApplyDone
});
function passTeamApplyDone(error, obj) {
    console.log(&#x27;通过入群申请&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="previewFile"><span class="type-signature"></span>previewFile(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>预览文件</p>
<ul>
<li>开发者可以预览文件, 支持以下几种场景<ul>
<li>通过参数<code>fileInput</code>传入文件选择 dom 节点或者节点 ID, SDK 会读取该节点下的文件, 在上传完成前请不要操作该节点下的文件</li>
<li>通过参数<code>blob</code>传入 Blob 对象</li>
<li>通过参数<code>dataURL</code>传入包含 MIME type 和 base64 数据的 data URL, 此用法需要浏览器支持 Blob</li>
</ul>
</li>
<li>SDK会将文件上传到文件服务器, 然后将拿到的文件对象在<code>done</code>回调中传给开发者, 文件对象有以下几种<ul>
<li><a href="Image.html"><code>图片对象</code></a></li>
<li><a href="Audio.html"><code>音频对象</code></a></li>
<li><a href="Video.html"><code>视频对象</code></a></li>
<li><a href="File.html"><code>文件对象</code></a></li>
</ul>
</li>
<li>开发者在拿到文件对象之后, 可以调用<a href="NIM.html#sendFile"><code>发送文件消息</code></a>来发送文件消息。</li>
<li>文件大小限制为最大 100M<ul>
<li>高级浏览器会在上传前就检测文件大小</li>
<li>IE8/IE9 会在上传完成后检测文件大小</li>
</ul>
</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>type</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>文件过滤器</p>
<ul>
<li>image会过滤掉非图片的文件, audio过滤掉非音频, video会过滤掉非视频的文件</li>
<li>IE8/IE9 不支持文件过滤</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>fileInput</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>
|

<span class="param-type">Node</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>文件选择 dom 节点或者节点 ID, SDK 会读取该节点下的文件, 在上传完成前请不要操作该节点下的文件</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>maxSize</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>限制文件的大小，单位字节</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>commonUpload</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>使用普通上传（最大100M文件）</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>blob</code></td>
            

            <td class="type">
            
                
<span class="param-type">Blob</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>Blob 对象</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>dataURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>包含 MIME type 和 base64 数据的 data URL</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>uploadprogress</code></td>
            

            <td class="type">
            
                
<span class="param-type">uploadprogress</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>上传进度, ie9以下不支持上传进度</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>nosScenes</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>存储场景，不传默认实例化配置，默认为&quot;im&quot;</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>nosSurvivalTime</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>存储有效时间，不传默认实例化配置 不得小于一天，单位秒</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>结果回调函数, 成功时会收到文件对象, 请参考</p>
<ul>
<li><a href="Image.html"><code>图片对象</code></a></li>
<li><a href="Audio.html"><code>音频对象</code></a></li>
<li><a href="Video.html"><code>视频对象</code></a></li>
<li><a href="File.html"><code>文件对象</code></a></li>
</ul></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.previewFile({
    type: &#x27;image&#x27;,
    fileInput: fileInput,
    uploadprogress: function(obj) {
        console.log(&#x27;文件总大小: &#x27; + obj.total + &#x27;bytes&#x27;);
        console.log(&#x27;已经上传的大小: &#x27; + obj.loaded + &#x27;bytes&#x27;);
        console.log(&#x27;上传进度: &#x27; + obj.percentage);
        console.log(&#x27;上传进度文本: &#x27; + obj.percentageText);
    },
    done: function(error, file) {
        console.log(&#x27;上传image&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;));
        // show file to the user
        if (!error) {
            var msg = nim.sendFile({
                scene: &#x27;p2p&#x27;,
                to: &#x27;account&#x27;,
                file: file,
                done: sendMsgDone
            });
            console.log(&#x27;正在发送p2p image消息, id=&#x27; + msg.idClient);
            pushMsg(msg);
        }
    }
});</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="processImage"><span class="type-signature"></span>processImage(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>处理图片</p>
<p>此方法接收一组图片操作, 按操作顺序依次处理图片, 可选的操作包括：</p>
<ul>
<li><a href="NIM.html#qualityImage"><code>修改图片质量</code></a></li>
<li><a href="NIM.html#interlaceImage"><code>interlace 图片</code></a></li>
<li><a href="NIM.html#rotateImage"><code>旋转图片</code></a></li>
<li><a href="NIM.html#blurImage"><code>高斯模糊图片</code></a></li>
<li><a href="NIM.html#cropImage"><code>裁剪图片</code></a></li>
<li><a href="NIM.html#thumbnailImage"><code>生成缩略图</code></a></li>
<li><a href="NIM.html#previewFile"><code>预览文件</code></a></li>
<li><a href="NIM.html#sendFile"><code>发送文件消息</code></a></li>
</ul>
<p>每个操作所需的参数请参考上面的各个方法, 除了上面方法列出来的参数之外, 每个操作需要提供操作类型, 分别是</p>
<ul>
<li><code>'quality'</code></li>
<li><code>'interlace'</code></li>
<li><code>'rotate'</code></li>
<li><code>'blur'</code></li>
<li><code>'crop'</code></li>
<li><code>'thumbnail'</code></li>
</ul>
<p>请参考下面的示例代码</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>原图 url</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>ops</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array</span>



            
            </td>

            

            

            <td class="description last"><p>操作序列</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数, 成功时附上处理后的图片 url</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">// 裁剪后旋转
var url = &#x27;http://nim.nos.netease.com/MTAxMTAwMg==/bmltYV8xNDc5OTNfMTQ0MzE0NTgyNDI0M184YjFkYTMwMS02NjcxLTRiYjktYTUwZC04ZTVlZjZlNzZjMzA=&#x27;;
nim.processImage({
    url: url,
    ops: [
        {
            type: &#x27;crop&#x27;,
            x: 100,
            y: 0,
            width: 250,
            height: 250,
        },
        {
            type: &#x27;thumbnail&#x27;,
            mode: &#x27;cover&#x27;,
            width: 80,
            height: 80
        }
    ],
    done: processImageDone
});
function processImageDone(error, obj) {
    console.log(&#x27;处理图片&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="qualityImage"><span class="type-signature"></span>qualityImage(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>修改图片质量</p>
<ul>
<li>只支持通过<a href="NIM.html#previewFile"><code>预览文件</code></a>或<a href="NIM.html#sendFile"><code>发送文件消息</code></a>拿到的图片 url, 或者经过其他图片操作后拿到的图片 url</li>
<li>默认图片质量为100, 开发者可以降低图片质量来省流量</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>原图 url</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>quality</code></td>
            

            <td class="type">
            
                
<span class="param-type">Int</span>



            
            </td>

            

            

            <td class="description last"><p>图片质量, 必须为整数, 取值范围为 0-100, 此方法内部使用 Math.round 来格式化 quality</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数, 成功时附上修改质量后的图片 url</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">var url = &#x27;http://nim.nos.netease.com/MTAxMTAwMg==/bmltYV8xNDc5OTNfMTQ0MzE0NTgyNDI0M184YjFkYTMwMS02NjcxLTRiYjktYTUwZC04ZTVlZjZlNzZjMzA=&#x27;;
var qualityUrl = nim.qualityImage({
    url: url,
    quality: 20,
    done: qualityImageDone
});
function qualityImageDone(error, obj) {
    console.log(&#x27;修改图片质量&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="rejectFriendApply"><span class="type-signature"></span>rejectFriendApply(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>拒绝好友申请</p>
<ul>
<li><a href="NIM.html#applyFriend"><code>申请加某个用户为好友</code></a>后, 对方会收到一条类型为<code>'applyFriend'</code>的<a href="SystemMessage.html#.type"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为申请方的帐号, <code>to</code>字段的值为接收方的账号, 用户在收到好友申请后, 可以选择通过或者拒绝好友申请。<ul>
<li>如果<a href="NIM.html#passFriendApply"><code>通过好友申请</code></a>, 那么申请方会收到一条类型为<code>'passFriendApply'</code>的<a href="SystemMessage.html#.type"><code>系统通知</code></a>, 此类群通知消息的<code>from</code>字段的值为通过方的帐号, <code>to</code>字段的值为申请方的账号。</li>
<li>如果<a href="NIM.html#rejectFriendApply"><code>拒绝好友申请</code></a>, 那么申请方会收到一条类型为<code>'rejectFriendApply'</code>的<a href="SystemMessage.html#.type"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为拒绝方的帐号, <code>to</code>字段的值为申请方的账号。</li>
</ul>
</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>idServer</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>对应的系统通知的 <code>idServer</code></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>account</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>要拒绝好友申请的账号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>ps</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>附言, 选填, 开发者也可以使用JSON格式的字符串来扩展此内容</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#rejectFriendApply"><code>直接加为好友</code></a></li>
			
			<li><a href="NIM.html#applyFriend"><code>申请加为好友</code></a></li>
			
			<li><a href="NIM.html#passFriendApply"><code>通过好友申请</code></a></li>
			
			<li><a href="NIM.html#deleteFriend"><code>删除好友</code></a></li>
			
			<li><a href="NIM.html#updateFriend"><code>更新好友</code></a></li>
			
			<li><a href="NIM.html#getFriends"><code>获取好友列表</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">// 假设 sysMsg 是通过回调 &#x60;onsysmsg&#x60; 收到的系统通知
nim.rejectFriendApply({
    idServer: sysMsg.idServer,
    account: &#x27;account&#x27;,
    ps: &#x27;ps&#x27;,
    done: rejectFriendApplyDone
});
function rejectFriendApplyDone(error, obj) {
    console.log(error);
    console.log(obj);
    console.log(&#x27;拒绝好友申请&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;));
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="rejectSuperTeamApply"><span class="type-signature"></span>rejectSuperTeamApply(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>拒绝入群申请</p>
<ul>
<li>用户<a href="NIM.html#applySuperTeam"><code>申请加入高级群</code></a>后, 目标群的群主和管理员会收到一条类型为<code>'applySuperTeam'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>，可调用该方法拒绝该入群申请</li>
<li>如果<a href="NIM.html#rejectSuperTeamApply"><code>拒绝入群申请</code></a>, 那么申请人会收到一条类型为<code>'rejectSuperTeamApply'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为拒绝方的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="SuperTeam.html"><code>群</code></a>。</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>idServer</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>对应的系统通知的 <code>idServer</code></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>群ID</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>from</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>申请方的帐号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>ps</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>附言, 选填, 长度不能大于5000, 开发者也可以使用JSON格式的字符串来扩展此内容</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#applySuperTeam"><code>申请入群</code></a></li>
			
			<li><a href="NIM.html#passSuperTeamApply"><code>通过入群申请</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">// 假设 sysMsg 是通过回调 &#x60;onsysmsg&#x60; 收到的系统通知
nim.rejectSuperTeamApply({
    idServer: sysMsg.idServer,
    teamId: &#x27;123&#x27;,
    from: &#x27;a2&#x27;,
    ps: &#x27;就不&#x27;,
    done: rejectSuperTeamApplyDone
});
function rejectSuperTeamApplyDone(error, obj) {
    console.log(&#x27;拒绝入群申请&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="rejectSuperTeamInvite"><span class="type-signature"></span>rejectSuperTeamInvite(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>拒绝入群邀请</p>
<ul>
<li>高级群的群主和管理员在邀请成员加入群（通过操作<code>创建群</code>或<a href="NIM.html#addSuperTeamMembers"><code>拉人入群</code></a>）之后, 被邀请的人会收到一条类型为<code>'teamInvite'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为邀请方的帐号, <code>to</code>字段的值为对应的群ID, 此类系统通知的<code>attach</code>有一个字段<code>team</code>的值为被邀请进入的<a href="SuperTeam.html"><code>群</code></a>, 被邀请的人可以选择接受邀请或者拒绝邀请。<ul>
<li>如果<a href="NIM.html#acceptSuperTeamInvite"><code>接受入群邀请</code></a>, 那么该群的所有群成员会收到一条类型为<code>'acceptSuperTeamInvite'</code>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>, 此类群通知消息的<code>from</code>字段的值为接受入群邀请的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="SuperTeam.html"><code>群对象</code></a>, <code>attach</code>有一个字段<code>members</code>的值为接收入群邀请的群成员列表。</li>
<li>如果<a href="NIM.html#rejectSuperTeamInvite"><code>拒绝入群邀请</code></a>, 那么邀请你的人会收到一条类型为<code>'rejectSuperTeamInvite'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为拒绝入群邀请的人的帐号, <code>to</code>字段的值为对应的群ID。</li>
</ul>
</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>idServer</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>对应的系统通知的 <code>idServer</code></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>from</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>邀请方的帐号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>ps</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>附言, 选填, 长度不能大于5000, 开发者也可以使用JSON格式的字符串来扩展此内容</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#acceptSuperTeamInvite"><code>接受入群邀请</code></a></li>
			
			<li><a href="NIM.html#addSuperTeamMembers"><code>拉人入群</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">// 假设 sysMsg 是通过回调 &#x60;onsysmsg&#x60; 收到的系统通知
nim.rejectSuperTeamInvite({
    idServer: sysMsg.idServer,
    teamId: &#x27;123&#x27;,
    from: &#x27;zyy1&#x27;,
    ps: &#x27;就不&#x27;,
    done: rejectSuperTeamInviteDone
});
function rejectSuperTeamInviteDone(error, obj) {
    console.log(&#x27;拒绝入群邀请&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="rejectTeamApply"><span class="type-signature"></span>rejectTeamApply(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>拒绝入群申请</p>
<ul>
<li>用户可以主动<a href="NIM.html#applyTeam"><code>申请加入高级群</code></a>, 目标群的群主和管理员会收到一条类型为<code>'applyTeam'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为申请方的帐号, <code>to</code>字段的值为对应的群ID, 高级群的群主和管理员在收到入群申请后, 可以选择通过或者拒绝入群申请。<ul>
<li>如果<a href="NIM.html#passTeamApply"><code>通过入群申请</code></a>, 那么该群的所有群成员会收到一条类型为<code>'passTeamApply'</code>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>, 此类群通知消息的<code>from</code>字段的值为通过入群申请的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="Team.html"><code>群对象</code></a>, <code>attach</code>有一个字段<code>account</code>包含了申请方的帐号, <code>attach</code>有一个字段<code>members</code>的值为被通过申请的群成员列表。</li>
<li>如果<a href="NIM.html#rejectTeamApply"><code>拒绝入群申请</code></a>, 那么申请人会收到一条类型为<code>'rejectTeamApply'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为拒绝方的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="Team.html"><code>群</code></a>。</li>
</ul>
</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>idServer</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>对应的系统通知的 <code>idServer</code></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>群ID</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>from</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>申请方的帐号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>ps</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>附言, 选填, 开发者也可以使用JSON格式的字符串来扩展此内容</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#applyTeam"><code>申请入群</code></a></li>
			
			<li><a href="NIM.html#passTeamApply"><code>通过入群申请</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">// 假设 sysMsg 是通过回调 &#x60;onsysmsg&#x60; 收到的系统通知
nim.rejectTeamApply({
    idServer: sysMsg.idServer,
    teamId: &#x27;123&#x27;,
    from: &#x27;a2&#x27;,
    ps: &#x27;就不&#x27;,
    done: rejectTeamApplyDone
});
function rejectTeamApplyDone(error, obj) {
    console.log(&#x27;拒绝入群申请&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="rejectTeamInvite"><span class="type-signature"></span>rejectTeamInvite(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>拒绝入群邀请</p>
<ul>
<li>高级群的群主和管理员在邀请成员加入群（通过操作<a href="NIM.html#createTeam"><code>创建群</code></a>或<a href="NIM.html#addTeamMembers"><code>拉人入群</code></a>）之后, 被邀请的人会收到一条类型为<code>'teamInvite'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为邀请方的帐号, <code>to</code>字段的值为对应的群ID, 此类系统通知的<code>attach</code>有一个字段<code>team</code>的值为被邀请进入的<a href="Team.html"><code>群</code></a>, 被邀请的人可以选择接受邀请或者拒绝邀请。<ul>
<li>如果<a href="NIM.html#acceptTeamInvite"><code>接受入群邀请</code></a>, 那么该群的所有群成员会收到一条类型为<code>'acceptTeamInvite'</code>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>, 此类群通知消息的<code>from</code>字段的值为接受入群邀请的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="Team.html"><code>群对象</code></a>, <code>attach</code>有一个字段<code>members</code>的值为接收入群邀请的群成员列表。</li>
<li>如果<a href="NIM.html#rejectTeamInvite"><code>拒绝入群邀请</code></a>, 那么邀请你的人会收到一条类型为<code>'rejectTeamInvite'</code>的<a href="SystemMessage.html"><code>系统通知</code></a>, 此类系统通知的<code>from</code>字段的值为拒绝入群邀请的人的帐号, <code>to</code>字段的值为对应的群ID。</li>
</ul>
</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>idServer</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>对应的系统通知的 <code>idServer</code></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>from</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>邀请方的帐号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>ps</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>附言, 选填, 开发者也可以使用JSON格式的字符串来扩展此内容</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#acceptTeamInvite"><code>接受入群邀请</code></a></li>
			
			<li><a href="NIM.html#addTeamMembers"><code>拉人入群</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">// 假设 sysMsg 是通过回调 &#x60;onsysmsg&#x60; 收到的系统通知
nim.rejectTeamInvite({
    idServer: sysMsg.idServer,
    teamId: &#x27;123&#x27;,
    from: &#x27;zyy1&#x27;,
    ps: &#x27;就不&#x27;,
    done: rejectTeamInviteDone
});
function rejectTeamInviteDone(error, obj) {
    console.log(&#x27;拒绝入群邀请&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="removeFromBlacklist"><span class="type-signature"></span>removeFromBlacklist(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>从黑名单移除</p>
<ul>
<li>如果一个用户被从黑名单移除, 那么会重新收到此用户发送的消息</li>
<li>SDK内部调用<a href="NIM.html#markInBlacklist"><code>nim.markInBlacklist</code></a>来完成实际工作</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>account</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>要从黑名单移除的账号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#markInBlacklist"><code>nim.markInBlacklist</code></a></li>
			
			<li><a href="NIM.html#addToBlacklist"><code>nim.addToBlacklist</code></a></li>
			
			<li><a href="NIM.html#getRelations"><code>nim.getRelations</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.removeFromBlacklist({
    account: &#x27;account&#x27;,
    done: removeFromBlacklistDone
});
function removeFromBlacklistDone(error, obj) {
    console.log(&#x27;从黑名单移除&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
    if (!error) {
        removeFromBlacklist(obj);
    }
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="removeFromMutelist"><span class="type-signature"></span>removeFromMutelist(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>从静音列表移除</p>
<ul>
<li>SDK只负责维护静音列表, 具体要根据静音列表进行的操作由开发者决定</li>
<li>SDK内部调用<a href="NIM.html#markInMutelist"><code>nim.markInMutelist</code></a>来完成实际工作</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>account</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>要从静音列表移除的账号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#markInMutelist"><code>nim.markInMutelist</code></a></li>
			
			<li><a href="NIM.html#addToMutelist"><code>nim.addToMutelist</code></a></li>
			
			<li><a href="NIM.html#getRelations"><code>nim.getRelations</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.removeFromMutelist({
    account: &#x27;account&#x27;,
    done: removeFromMutelistDone
});
function removeFromMutelistDone(error, obj) {
    console.log(&#x27;从静音列表移除&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
    if (!error) {
        removeFromMutelist(obj);
    }
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="removeSuperTeamManagers"><span class="type-signature"></span>removeSuperTeamManagers(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>移除群管理员</p>
<ul>
<li><a href="NIM.html#removeSuperTeamManagers"><code>移除群管理员</code></a>后, 所有<a href="SuperTeamMember.html"><code>群成员</code></a>会收到一条类型为<a href="IMMessage.html#.attach"><code><code>'removeSuperTeamManagers'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。此类群通知消息的<code>from</code>字段的值为移除群管理员的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>accounts</code>的值为被移除的管理员的帐号列表, <code>attach</code>有一个字段<code>members</code>的值为被移除管理员的群成员列表。</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>accounts</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>



            
            </td>

            

            

            <td class="description last"><p>要移除的管理员帐号列表</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#addSuperTeamManagers"><code>添加群管理员</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.removeSuperTeamManagers({
    teamId: &#x27;123&#x27;,
    accounts: [&#x27;a2&#x27;, &#x27;a3&#x27;],
    done: removeSuperTeamManagersDone
});
function removeSuperTeamManagersDone(error, obj) {
    console.log(&#x27;移除群管理员&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="removeSuperTeamMembers"><span class="type-signature"></span>removeSuperTeamMembers(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>踢人出群</p>
<ul>
<li><a href="NIM.html#removeSuperTeamMembers"><code>踢人出群</code></a>, 所有<a href="SuperTeamMember.html"><code>超大群群成员</code></a>会收到一条类型为<a href="IMMessage.html#.attach"><code><code>'removeSuperTeamMembers'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。此类群通知消息的<code>from</code>字段的值为退群的人的帐号, <code>to</code>字段的值为对应的群ID；<code>attach</code>有一个字段<code>team</code>的值为对应的<a href="SuperTeam.html"><code>超大群对象</code></a>，有一个字段accounts的是被踢人的账号数组。</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>accounts</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>



            
            </td>

            

            

            <td class="description last"><p>要移除的成员帐号列表</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#addSuperTeamMembers"><code>拉人入超大群</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.removeSuperTeamMembers({
    teamId: &#x27;123&#x27;,
    accounts: [&#x27;a3&#x27;, &#x27;a4&#x27;],
    done: removeSuperTeamMembersDone
});
function removeSuperTeamMembersDone(error, obj) {
    console.log(&#x27;踢人出群&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="removeTeamManagers"><span class="type-signature"></span>removeTeamManagers(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>移除群管理员</p>
<ul>
<li><a href="NIM.html#removeTeamManagers"><code>移除群管理员</code></a>后, 所有<a href="TeamMember.html"><code>群成员</code></a>会收到一条类型为<a href="IMMessage.html#.attach"><code><code>'removeTeamManagers'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。此类群通知消息的<code>from</code>字段的值为移除群管理员的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>accounts</code>的值为被移除的管理员的帐号列表, <code>attach</code>有一个字段<code>members</code>的值为被移除管理员的群成员列表。</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>accounts</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>



            
            </td>

            

            

            <td class="description last"><p>要移除的管理员帐号列表</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#addTeamManagers"><code>添加群管理员</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.removeTeamManagers({
    teamId: &#x27;123&#x27;,
    accounts: [&#x27;a2&#x27;, &#x27;a3&#x27;],
    done: removeTeamManagersDone
});
function removeTeamManagersDone(error, obj) {
    console.log(&#x27;移除群管理员&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="removeTeamMembers"><span class="type-signature"></span>removeTeamMembers(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>踢人出群</p>
<ul>
<li><a href="NIM.html#removeTeamMembers"><code>踢人出群</code></a>后, 所有<a href="TeamMember.html"><code>群成员</code></a>会收到一条类型为<a href="IMMessage.html#.attach"><code><code>'removeTeamMembers'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。此类群通知消息的<code>from</code>字段的值为踢人的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="Team.html"><code>群对象</code></a>, <code>attach</code>有一个字段<code>accounts</code>的值为被踢的人的帐号列表。</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>accounts</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>



            
            </td>

            

            

            <td class="description last"><p>要移除的成员帐号列表</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#addTeamMembers"><code>拉人入群</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.removeTeamMembers({
    teamId: &#x27;123&#x27;,
    accounts: [&#x27;a3&#x27;, &#x27;a4&#x27;],
    done: removeTeamMembersDone
});
function removeTeamMembersDone(error, obj) {
    console.log(&#x27;踢人出群&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="resetCurrSession"><span class="type-signature"></span>resetCurrSession()</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>重置当前会话</p>
<ul>
<li>重置当前会话后, 所有会话在收到消息之后会更新未读数</li>
</ul>
    </div>
    

    

    

    
    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.resetCurrSession();</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="resetSessionUnread"><span class="type-signature"></span>resetSessionUnread(sessionId)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>重置某个会话的未读数</p>
<ul>
<li>如果是已经存在的会话记录, 会将此会话未读数置为 0, 那么会收到<code>onupdatesession</code>回调</li>
<li>之后此会话在收到消息之后依然会更新未读数</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>sessionId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>会话ID</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.resetSessionUnread(&#x27;sessionId&#x27;);</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="rotateImage"><span class="type-signature"></span>rotateImage(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>旋转图片</p>
<ul>
<li>只支持通过<a href="NIM.html#previewFile"><code>预览文件</code></a>或<a href="NIM.html#sendFile"><code>发送文件消息</code></a>拿到的图片 url, 或者经过其他图片操作后拿到的图片 url</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>原图 url</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>angle</code></td>
            

            <td class="type">
            
                
<span class="param-type">Int</span>



            
            </td>

            

            

            <td class="description last"><p>旋转的角度, 正整数表示顺时针, 负整数表示逆时针, 必须为整数, 此方法内部会先将 angle 格式化为 [0, 360] 范围内的数字, 然后使用 Math.round 来格式化 angle</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数, 成功时附上旋转后的图片的 url</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">var url = &#x27;http://nim.nos.netease.com/MTAxMTAwMg==/bmltYV8xNDc5OTNfMTQ0MzE0NTgyNDI0M184YjFkYTMwMS02NjcxLTRiYjktYTUwZC04ZTVlZjZlNzZjMzA=&#x27;;
var rotateUrl = nim.rotateImage({
    url: url,
    angle: 90,
    done: rotateImageDone
});
function rotateImageDone(error, obj) {
    console.log(&#x27;旋转图片&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="saveMsgsToLocal"><span class="type-signature"></span>saveMsgsToLocal(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>将消息存储至本地数据库</p>
<ul>
<li>若不支持数据库，算成功</li>
<li>SDK仅会主动存储离线、漫游、在线时收发的消息，其他消息开发者可根据需要调用该接口存储到本地数据库</li>
<li>请考虑用户终端上数据库的容量合理使用、定时清除，避免出现爆仓等问题</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>msgs</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array</span>



            
            </td>

            

            

            <td class="description last"><p>要存储的消息数据，每条消息都应该至少包含idClient，并符合云信消息的结构</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.saveMsgsToLocal({
 msgs: msgs, // 要存储的消息
 done: err =&gt; console.log(err ? &#x27;存储失败&#x27; : &#x27;存储成功&#x27;)
})</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="searchHistoryMsgs"><span class="type-signature"></span>searchHistoryMsgs(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>获取云端包含关键词的历史记录</p>
<ul>
<li>跟<a href="NIM.html#getHistoryMsgs"><code>获取历史消息</code></a>接口类似, 只是去掉了参数<code>lastMsgId</code>, 增加了参数<code>keyword(要搜索的关键词)</code></li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>scene</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p><a href="IMMessage.html#.scene"><code>场景</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>to</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>聊天对象, 账号或者群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>keyword</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>待搜索的关键词</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>beginTime</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>时间戳, 开始时间, 精确到ms, 默认为0</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>endTime</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>时间戳, 结束时间, 精确到ms, 默认为服务器的当前时间</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>limit</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>本次查询的消息数量限制, 最多100条, 默认100条</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>reverse</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>默认<code>false</code>表示从<code>endTime</code>开始往前查找历史消息;<br>                                             <code>true</code>表示从<code>beginTime</code>开始往后查找历史消息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>asc</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>默认<code>false</code>表示返回的消息按时间逆序排序;<br>                                             <code>true</code>表示按时间正序排序</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>结果回调函数, 成功时会额外附上<a href="IMMessage.html"><code>消息</code></a>列表</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.searchHistoryMsgs({
    scene: &#x27;p2p&#x27;,
    to: &#x27;account&#x27;,
    keyword: &#x27;keyword&#x27;,
    done: searchHistoryMsgsDone
});
function searchHistoryMsgsDone(error, obj) {
    console.log(&#x27;获取云端包含关键词的历史记录&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
    if (!error) {
        console.log(obj.msgs);
    }
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="searchLocal"><span class="type-signature"></span>searchLocal(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>搜索本地内容，支持搜索本地会话和本地联系人</p>
<ul>
<li>可细分为大搜索和定向搜索<ul>
<li>传入参数<code>keyPath</code>时，SDK会根据键路径做定向搜索。比如<code>keyPath</code>为<code>session</code>时，只搜索<a href="Session.html"><code>会话</code></a>;<code>keyPath</code>为<code>user</code>时，只搜索<a href="User.html"><code>好友联系人</code></a>;<code>keyPath</code>为<code>session.lastMsg.type</code>时，只搜索会话<code>lastMsg</code>的<a href="IMMessage.html#.type"><code>消息类型</code></a></li>
<li>没有传入参数<code>keyPath</code>时，SDK会进行大搜索：遍历搜索所有的<code>keyPath</code></li>
</ul>
</li>
<li><code>user</code>的<code>keyPath</code>列表：<code>['user.account', 'user.nick', 'user.alias']</code>；<code>session</code>的<code>keyPath</code>列表：<code>['session.id', 'session.scene', 'session.lastMsg.type', 'session.lastMsg.text', 'session.localCustom', 'session.target.account', 'session.target.nick', 'session.target.alias', 'session.target.name']</code></li>
<li>不使用数据库时，返回空</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"><p>查询参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>keyword</code></td>
            

            <td class="type">
            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>待搜索的关键词</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>keyPath</code></td>
            

            <td class="type">
            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>定点搜索时使用</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>结果回调函数，第二个参数是一个对象，它有三个属性<code>users</code>、<code>sessions</code>和<code>msg</code>， 分别是匹配到的用户、匹配到的会话和没匹配到时的原因</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="sendCustomMsg"><span class="type-signature"></span>sendCustomMsg(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>发送自定义消息</p>
<ul>
<li>自定义消息是<a href="IMMessage.html#.type"><code>消息类型</code></a>的一种</li>
<li>下面的代码用自定义消息实现了<code>石头剪刀布</code>游戏</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>scene</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p><a href="IMMessage.html#.scene"><code>场景</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>to</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>
|

<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>接收方, 对方帐号或者群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>content</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>自定义消息的消息内容, 推荐使用JSON格式构建</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>resend</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>是否是重发</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>idClient</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>如果是重发, 那么需要带上之前生成的idClient来标记这条消息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>custom</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>扩展字段</p>
<ul>
<li>推荐使用<code>JSON</code>格式构建, 非<code>JSON</code>格式的话, Web端会正常接收, 但是会被其它端丢弃</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>pushContent</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>自定义推送文案</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>pushPayload</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>自定义的推送属性</p>
<ul>
<li>推荐使用<code>JSON</code>格式构建, 非<code>JSON</code>格式的话, Web端会正常接收, 但是会被其它端丢弃</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>apns</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>特殊推送选项, 只在群会话中使用</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>accounts</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>需要特殊推送的账号列表, 不填表示推送给当前会话内的所有用户</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>content</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>需要特殊推送的文案, 不填的话默认为 pushContent</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>forcePush</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否强制推送, true 表示即使推送列表中的胡勇屏蔽了当前会话（如静音）, 仍能够推送当前这条内容给相应用户</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isHistoryable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否存储云端历史</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isRoamingable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否支持漫游</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isSyncable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否支持发送者多端同步</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>cc</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>是否支持抄送</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isPushable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否需要推送</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isOfflinable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否要存离线</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isUnreadable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否计入消息未读数</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>needPushNick</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否需要推送昵称</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isLocal</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>是否是本地消息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>localFrom</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>本地消息的发送方，默认是当前用户</p>
<ul>
<li>只有发送本地消息时，才可自定义发送方</li>
<li><code>true</code>表示本地消息, 那么SDK并不会发送此条消息, 而是直接调用回调表示发送成功, 并更新对应的会话</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>replyMsg</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>要回复的消息对象，表示当前消息是对某条消息的回复</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p><a href="IMMessage.html"><code>消息</code></a></p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Message</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">var value = Math.ceil(Math.random()*3);
var content = {
    type: 1,
    data: {
        value: value
    }
};
var msg = nim.sendCustomMsg({
    scene: &#x27;p2p&#x27;,
    to: &#x27;account&#x27;,
    content: JSON.stringify(content),
    done: sendMsgDone
});
console.log(&#x27;正在发送p2p自定义消息, id=&#x27; + msg.idClient);
pushMsg(msg);</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="sendCustomSysMsg"><span class="type-signature"></span>sendCustomSysMsg(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>发送自定义系统通知</p>
<ul>
<li>开发者可以向其他用户或群发送自定义通知。</li>
<li>自定义系统通知和自定义消息的区别如下<ul>
<li>自定义消息属于<a href="IMMessage.html"><code>消息</code></a>, 会存储在云信的消息数据库中, 需要跟其他<a href="IMMessage.html"><code>消息</code></a>一同展现给用户。</li>
<li>自定义系统通知属于<a href="SystemMessage.html"><code>系统通知</code></a>, 用于第三方通知自己, 不会存储在云信的数据库中, SDK不会解析这些通知, SDK仅仅负责传递这些通知。</li>
</ul>
</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>scene</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>场景跟<a href="IMMessage.html#.scene"><code>消息场景</code></a>的一样, 分为<code>p2p(点对点)</code>和<code>team(群)</code>和<code>superTeam(超大群)</code>。</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>to</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>
|

<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>接收方, 帐号或者群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>content</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>自定义系统通知的内容, 推荐使用JSON格式构建</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>apnsText</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>apns推送文案, 仅对接收方为iOS设备有效</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>pushPayload</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>自定义系统通知的推送属性</p>
<ul>
<li>推荐使用<code>JSON</code>格式构建, 非<code>JSON</code>格式的话, Web端会正常接收, 但是会被其它端丢弃</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>sendToOnlineUsersOnly</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否只发送给在线用户。<br>                                                                 true时只发送给在线用户, 如果接收方不在线, 这条通知将被丢弃。<br>                                                                 适合发送即时通知, 比如正在输入。<br>                                                                 false时假如接收方在线, 那么会立即收到该通知,<br>                                                                 假如接收方不在线, 会在其上线后推送过去。</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>cc</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>是否抄送</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isPushable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否需要推送</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>needPushNick</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>是否需要推送昵称</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#sendCustomMsg"><code>发送自定义消息</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p>SDK生成的ID</p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">String</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">var content = {
    type: &#x27;type&#x27;,
    value: &#x27;value&#x27;
};
content = JSON.stringify(content);
var msgId = nim.sendCustomSysMsg({
    scene: &#x27;p2p&#x27;,
    to: &#x27;account&#x27;,
    content: content,
    sendToOnlineUsersOnly: false,
    apnsText: content,
    done: sendCustomSysMsgDone
});
console.log(&#x27;正在发送p2p自定义系统通知, id=&#x27; + msgId);
function sendCustomSysMsgDone(error, msg) {
    console.log(error);
    console.log(msg);
    console.log(&#x27;发送&#x27; + msg.scene + &#x27;自定义系统通知&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;) + &#x27;, id=&#x27; + msg.idClient);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="sendFile"><span class="type-signature"></span>sendFile(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>发送文件消息</p>
<ul>
<li>文件消息是<a href="IMMessage.html#.type"><code>消息类型</code></a>的一种</li>
<li>开发者可以直接发送文件消息<ul>
<li>支持以下几种场景<ul>
<li>通过参数<code>fileInput</code>传入文件选择 dom 节点或者节点 ID, SDK 会读取该节点下的文件, 在上传完成前请不要操作该节点下的文件</li>
<li>通过参数<code>blob</code>传入 Blob 对象</li>
<li>通过参数<code>dataURL</code>传入包含 MIME type 和 base64 数据的 data URL, 此用法需要浏览器支持 Blob</li>
</ul>
</li>
<li>SDK会先将文件上传到文件服务器, 然后把拿到的文件对象在<code>uploaddone</code>回调中传给用户, 然后将其拼装成文件消息发送出去。</li>
</ul>
</li>
<li>开发者也可以先<a href="NIM.html#previewFile"><code>预览文件</code></a>来获取文件对象, 然后调用此接口发送文件消息。<ul>
<li>通过参数<code>file</code>传入文件</li>
</ul>
</li>
<li>直接发送文件消息的话会在<code>beforesend</code>回调里面传入SDK生成的<code>idClient</code>, 如果先预览文件再发送, 那么此接口会直接返回<code>idClient</code></li>
<li>参数<code>type</code>指定了要发送的文件类型, 包括图片、音频、视频和普通文件, 对应的值分别为<code>'image'</code>、<code>'audio'</code>、<code>'video'</code>和<code>'file'</code>, 不传默认为<code>'file'</code>。</li>
<li>图片、音频、视频和普通文件的区别在于具体的文件信息不一样, 具体字段请参考<ul>
<li><a href="Image.html"><code>图片对象</code></a></li>
<li><a href="Audio.html"><code>音频对象</code></a></li>
<li><a href="Video.html"><code>视频对象</code></a></li>
<li><a href="File.html"><code>文件对象</code></a></li>
<li><code>机器人对象</code></li>
</ul>
</li>
<li>文件大小限制为最大100M<ul>
<li>高级浏览器会在上传前就检测文件大小</li>
<li>IE8和IE9会在上传完成后检测文件大小</li>
</ul>
</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>scene</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p><a href="IMMessage.html#.scene"><code>场景</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>to</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>
|

<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>接收方, 对方帐号或者群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>type</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>文件过滤器,<br>                                                         <code>'image'</code>会过滤掉非图片的文件, <code>'audio'</code>过滤掉非音频, <code>'video'</code>会过滤掉非视频的文件,<br>                                                         IE8/IE9 不支持文件过滤</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>fileInput</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>
|

<span class="param-type">Node</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>文件选择 dom 节点或者节点 ID, SDK 会读取该节点下的文件, 在上传完成前请不要操作该节点下的文件</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>maxSize</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>限制文件的大小，单位字节</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>commonUpload</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>使用普通上传（最大100M文件）</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>blob</code></td>
            

            <td class="type">
            
                
<span class="param-type">Blob</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>Blob 对象</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>dataURL</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>MIME type 和 base64 数据的 data URL</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>file</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>文件对象, 开发者可以通过<a href="NIM.html#previewFile"><code>预览文件</code></a>拿到文件对象</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>wxFilePath</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>仅供微信小程序使用, 通过 wx.chooseImage 或者 wx.startRecord 拿到的临时文件路径</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>resend</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>是否是重发</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>beginupload</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>开始上传图片的回调</p>
<ul>
<li>如果开发者传入 fileInput, 在此回调之前不能修改 fileInput</li>
<li>在此回调之后可以取消图片上传, 此回调会接收一个参数 <code>upload</code>, 调用 <code>upload.abort();</code> 来取消文件上传</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>uploadprogress</code></td>
            

            <td class="type">
            
                
<span class="param-type">uploadprogress</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>上传进度, IE9以下不支持上传进度</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>uploaddone</code></td>
            

            <td class="type">
            
                
<span class="param-type">uploaddone</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>上传完成回调</p>
<ul>
<li>此回调接收两个参数, error 和 obj</li>
<li>如果出错, error 包含详细的错误信息</li>
<li>如果上传成功, obj 包含详细的文件信息</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>beforesend</code></td>
            

            <td class="type">
            
                
<span class="param-type">beforesend</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>发送文件消息之前的回调函数</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>resend</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>是否是重发</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>idClient</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>如果是重发, 那么需要带上之前生成的idClient来标记这条消息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>custom</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>扩展字段</p>
<ul>
<li>推荐使用<code>JSON</code>格式构建, 非<code>JSON</code>格式的话, Web端会正常接收, 但是会被其它端丢弃</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>pushContent</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>自定义推送文案</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>pushPayload</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>自定义的推送属性</p>
<ul>
<li>推荐使用<code>JSON</code>格式构建, 非<code>JSON</code>格式的话, Web端会正常接收, 但是会被其它端丢弃</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>apns</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>特殊推送选项, 只在群会话中使用</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>accounts</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>需要特殊推送的账号列表, 不填表示推送给当前会话内的所有用户</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>content</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>需要特殊推送的文案, 不填的话默认为 pushContent</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>forcePush</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否强制推送, true 表示即使推送列表中的胡勇屏蔽了当前会话（如静音）, 仍能够推送当前这条内容给相应用户</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isHistoryable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否存储云端历史</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isRoamingable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否支持漫游</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isSyncable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否支持发送者多端同步</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>cc</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>是否支持抄送</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isPushable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否需要推送</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isOfflinable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否要存离线</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isUnreadable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否计入消息未读数</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>needPushNick</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否需要推送昵称</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isLocal</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>是否是本地消息</p>
<ul>
<li><code>true</code>表示本地消息, 那么SDK并不会发送此条消息, 而是直接调用回调表示发送成功, 并更新对应的会话</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>localFrom</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>本地消息的发送方，默认是当前用户</p>
<ul>
<li>只有发送本地消息时，才可自定义发送方</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>nosScenes</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>存储场景，不传默认实例化配置</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>nosSurvivalTime</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>存储有效时间，不传默认实例化配置 不得小于一天，单位秒</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>replyMsg</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>要回复的消息对象，表示当前消息是对某条消息的回复</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <ul>
<li>如果提供了参数fileInput, 那么先上传文件到服务器再发送, 不会返回<a href="IMMessage.html"><code>消息</code></a>, 会在beforesend里面返回<a href="IMMessage.html"><code>消息</code></a>.</li>
<li>如果提供了参数file, 那么直接发送文件消息, 返回<a href="IMMessage.html"><code>消息</code></a></li>
</ul>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>
|

<span class="param-type">Message</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.sendFile({
    scene: &#x27;p2p&#x27;,
    to: &#x27;account&#x27;,
    type: &#x27;image&#x27;,
    fileInput: fileInput,
    uploadprogress: function(obj) {
        console.log(&#x27;文件总大小: &#x27; + obj.total + &#x27;bytes&#x27;);
        console.log(&#x27;已经上传的大小: &#x27; + obj.loaded + &#x27;bytes&#x27;);
        console.log(&#x27;上传进度: &#x27; + obj.percentage);
        console.log(&#x27;上传进度文本: &#x27; + obj.percentageText);
    },
    uploaddone: function(error, file) {
        console.log(&#x27;上传&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, file);
    },
    beforesend: function(msg) {
        console.log(&#x27;正在发送p2p image消息, id=&#x27; + msg.idClient);
        pushMsg(msg);
    },
    done: sendMsgDone
});</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="sendGeo"><span class="type-signature"></span>sendGeo(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>发送地理位置消息</p>
<ul>
<li>地理位置消息是<a href="IMMessage.html#.type"><code>消息类型</code></a>的一种, <code>geo</code>参数请参考<a href="Geo.html"><code>地理位置对象</code></a></li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>scene</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p><a href="IMMessage.html#.scene"><code>场景</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>to</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>
|

<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>接收方, 对方帐号或者群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>geo</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>地理位置对象</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>lng</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            

            

            <td class="description last"><p>经度</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>lat</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>



            
            </td>

            

            

            <td class="description last"><p>纬度</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>title</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>地址描述</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>resend</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>是否是重发</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>idClient</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>如果是重发, 那么需要带上之前生成的idClient来标记这条消息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>custom</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>扩展字段</p>
<ul>
<li>推荐使用<code>JSON</code>格式构建, 非<code>JSON</code>格式的话, Web端会正常接收, 但是会被其它端丢弃</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>pushContent</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>自定义推送文案</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>pushPayload</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>自定义的推送属性</p>
<ul>
<li>推荐使用<code>JSON</code>格式构建, 非<code>JSON</code>格式的话, Web端会正常接收, 但是会被其它端丢弃</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>apns</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>特殊推送选项, 只在群会话中使用</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>accounts</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>需要特殊推送的账号列表, 不填表示推送给当前会话内的所有用户</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>content</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>需要特殊推送的文案, 不填的话默认为 pushContent</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>forcePush</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否强制推送, true 表示即使推送列表中的用户屏蔽了当前会话（如静音）, 仍能够推送当前这条内容给相应用户</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isHistoryable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否存储云端历史</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isRoamingable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否支持漫游</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isSyncable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否支持发送者多端同步</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>cc</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>是否支持抄送</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isPushable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否需要推送</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isOfflinable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否要存离线</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isUnreadable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否计入消息未读数</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>needPushNick</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否需要推送昵称</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isLocal</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>是否是本地消息</p>
<ul>
<li><code>true</code>表示本地消息, 那么SDK并不会发送此条消息, 而是直接调用回调表示发送成功, 并更新对应的会话</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>localFrom</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>本地消息的发送方，默认是当前用户</p>
<ul>
<li>只有发送本地消息时，才可自定义发送方</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>replyMsg</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>要回复的消息对象，表示当前消息是对某条消息的回复</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p><a href="IMMessage.html"><code>消息</code></a></p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Message</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">var msg = nim.sendGeo({
    scene: &#x27;p2p&#x27;,
    to: &#x27;account&#x27;,
    geo: {
        lng: &#x27;116.3833&#x27;,
        lat: &#x27;39.9167&#x27;,
        title: &#x27;Beijing&#x27;
    },
    done: sendMsgDone
});
console.log(&#x27;正在发送p2p geo消息, id=&#x27; + msg.idClient);
pushMsg(msg);</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="sendMsgReceipt"><span class="type-signature"></span>sendMsgReceipt(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>发送消息已读回执</p>
<ul>
<li>目前只支持<a href="IMMessage.html#.scene"><code>'p2p'</code></a>会话</li>
<li>如果没有传入消息, 则直接返回成功</li>
<li>如果已经发送过比传入的消息的时间戳大的已读回执, 那么直接返回成功</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>msg</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="IMMessage.html">IMMessage</a></span>



            
            </td>

            

            

            <td class="description last"><p>要发送已读回执的会话的最后一条消息, 可以直接通过<a href="Session.html"><code><code>session.lastMsg</code></code></a>来获取此消息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.sendMsgReceipt({
    msg: session.lastMsg,
    done: sendMsgReceiptDone
});
function sendMsgReceiptDone(error, obj) {
    console.log(&#x27;发送消息已读回执&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="sendRobotMsg"><span class="type-signature"></span>sendRobotMsg(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>给机器人发送消息</p>
<ul>
<li>机器人消息是<a href="IMMessage.html#.type"><code>消息类型</code></a>的一种</li>
<li>机器人消息类型分为type为robot</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>scene</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p><a href="IMMessage.html#.scene"><code>场景</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>to</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>
|

<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>接收方, 对方帐号或者群id，如果id为机器人，则点对点与机器人聊天，如果id为普通用户或者群，则相当于聊天界面@机器人</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>content</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>发送给机器人的消息内容</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>type</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>welcome:欢迎消息，text:文本，link:模块跳转</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>content</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>机器人消息内容</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>target</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>返回消息类型为BOT时出现的link元素类型block中的target</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>params</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>返回消息类型为BOT时出现的link元素类型block中的params</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>userid</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>区分谁和机器人说话的ID</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>channel</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>渠道</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>resend</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>是否是重发</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>idClient</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>如果是重发, 那么需要带上之前生成的idClient来标记这条消息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>apns</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>特殊推送选项, 只在群会话中使用</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>accounts</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>需要特殊推送的账号列表, 不填表示推送给当前会话内的所有用户</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>content</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>需要特殊推送的文案, 不填的话默认为 pushContent</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>forcePush</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否强制推送, true 表示即使推送列表中的胡勇屏蔽了当前会话（如静音）, 仍能够推送当前这条内容给相应用户</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isHistoryable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否存储云端历史</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isRoamingable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否支持漫游</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isSyncable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否支持发送者多端同步</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>cc</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>是否支持抄送</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isPushable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否需要推送</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isOfflinable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否要存离线</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isUnreadable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否计入消息未读数</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>needPushNick</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否需要推送昵称</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isLocal</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>是否是本地消息</p>
<ul>
<li><code>true</code>表示本地消息, 那么SDK并不会发送此条消息, 而是直接调用回调表示发送成功, 并更新对应的会话</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>localFrom</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>本地消息的发送方，默认是当前用户</p>
<ul>
<li>只有发送本地消息时，才可自定义发送方</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>replyMsg</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>要回复的消息对象，表示当前消息是对某条消息的回复</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p><a href="IMMessage.html"><code>消息</code></a></p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Message</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">var msg = nim.sendRobotMsg({
  scene: &#x27;p2p&#x27;,
  to: &#x27;nim-assistant&#x27;,
  content: {
    type: &#x27;text&#x27;,
    content: &#x27;hello&#x27;
  },
  body: &#x27;欢迎&#x27;,
  robotAccid: &#x27;nim-assistant&#x27;,
  done: function sendMsgDone (err) {
    console.log(11111111, err)
  }
})
console.log(&#x27;正在发送p2p自定义消息, id=&#x27; + msg.idClient);
pushMsg(msg);</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="sendTeamMsgReceipt"><span class="type-signature"></span>sendTeamMsgReceipt(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>标记群组消息已读</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamMsgReceipts</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;Object></span>



            
            </td>

            

            

            <td class="description last"><p>已读消息对象</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>teamMsgReceipt.teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群序号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>teamMsgReceipt.idServer</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>消息编号</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.sendTeamMsgReceipt({
  teamMsgReceipts: [{
     teamId: &#x27;1027484&#x27;,
     idServer: &#x27;68953284018302&#x27;
  }],
  done: sendTeamMsgReceiptDone
})
function sendTeamMsgReceiptDone (error, obj) {
  console.log(&#x27;标记群组消息已读&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;));
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="sendText"><span class="type-signature"></span>sendText(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>发送文本消息</p>
<ul>
<li>文本消息是消息的一种, 请参考<a href="IMMessage.html"><code>消息</code></a></li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>scene</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p><a href="IMMessage.html#.scene"><code>场景</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>to</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>接收方, 对方帐号或者群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>text</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>文本消息内容</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>resend</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>是否是重发</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>idClient</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>如果是重发, 那么需要带上之前生成的idClient来标记这条消息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>custom</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>扩展字段</p>
<ul>
<li>推荐使用<code>JSON</code>格式构建, 非<code>JSON</code>格式的话, Web端会正常接收, 但是会被其它端丢弃</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>pushContent</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>自定义推送文案</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>pushPayload</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>自定义的推送属性</p>
<ul>
<li>推荐使用<code>JSON</code>格式构建, 非<code>JSON</code>格式的话, Web端会正常接收, 但是会被其它端丢弃</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>needPushNick</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否需要推送昵称</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isHistoryable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否存储云端历史</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isRoamingable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否支持漫游</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isSyncable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否支持发送者多端同步</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>cc</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>是否支持抄送</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isInBlackList</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>发送此条消息时，发送方<code>'from'</code>是否在接收方<code>'to'</code>的黑名单列表中</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isPushable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否需要推送</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isOfflinable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否要存离线</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isUnreadable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否计入消息未读数</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>apns</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>特殊推送选项, 只在群会话中使用</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>accounts</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>需要特殊推送的账号列表, 不填表示推送给当前会话内的所有用户</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>content</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>需要特殊推送的文案, 不填的话默认为 pushContent</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>forcePush</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否强制推送, true 表示即使推送列表中的胡勇屏蔽了当前会话（如静音）, 仍能够推送当前这条内容给相应用户</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isLocal</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>是否是本地消息</p>
<ul>
<li><code>true</code>表示本地消息, 那么SDK并不会发送此条消息, 而是直接调用回调表示发送成功, 并更新对应的会话</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>localFrom</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>本地消息的发送方，默认是当前用户</p>
<ul>
<li>只有发送本地消息时，才可自定义发送方</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>needMsgReceipt</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>是否需要业务已读（包含该字段且为true即表示需要）</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>clientAntiSpam</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>是否需要过客户端反垃圾</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>yidunEnable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>是否需要过易盾反垃圾</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>antiSpamContent</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>在开启yidunEnable后, 开发者自定义的反垃圾字段（json格式)，格式如下：{&quot;type&quot;: 1, &quot;data&quot;: &quot;custom content&quot;} 字段说明：type:1.文本，2.图片，3视频，data内容:文本内容or图片地址or视频地址</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>antiSpamBusinessId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>用户配置的对某条单条消息另外反垃圾的业务ID</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>antiSpamUsingYidun</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>单条消息是否需要易盾反垃圾</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>needUpdateSession</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否需要刷新服务器会话列表，默认是（请注意区分两种会话）</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>replyMsg</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>要回复的消息对象，表示当前消息是对某条消息的回复</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p><a href="IMMessage.html"><code>消息</code></a></p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Message</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">var msg = nim.sendText({
    scene: &#x27;p2p&#x27;,
    to: &#x27;account&#x27;,
    text: &#x27;hello&#x27;,
    done: sendMsgDone
});
console.log(&#x27;正在发送p2p text消息, id=&#x27; + msg.idClient);
pushMsg(msg);
function sendMsgDone(error, msg) {
    console.log(&#x27;发送&#x27; + msg.scene + &#x27; &#x27; + msg.type + &#x27;消息&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;) + &#x27;, id=&#x27; + msg.idClient, error, msg);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="sendTipMsg"><span class="type-signature"></span>sendTipMsg(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>发送提醒消息</p>
<ul>
<li>提醒消息是<a href="IMMessage.html#.type"><code>消息类型</code></a>的一种</li>
<li>提醒消息用于会话内的状态提醒，如进入会话时出现的欢迎消息，或者会话命中敏感词后的提示消息等等.</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>scene</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p><a href="IMMessage.html#.scene"><code>场景</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>to</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>
|

<span class="param-type">Number</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>接收方, 对方帐号或者群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>tip</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>提醒内容</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>resend</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>是否是重发</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>idClient</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>如果是重发, 那么需要带上之前生成的idClient来标记这条消息</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>custom</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>扩展字段</p>
<ul>
<li>推荐使用<code>JSON</code>格式构建, 非<code>JSON</code>格式的话, Web端会正常接收, 但是会被其它端丢弃</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>pushContent</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>自定义推送文案</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>pushPayload</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>自定义的推送属性</p>
<ul>
<li>推荐使用<code>JSON</code>格式构建, 非<code>JSON</code>格式的话, Web端会正常接收, 但是会被其它端丢弃</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>apns</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>特殊推送选项, 只在群会话中使用</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>accounts</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;String></span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>需要特殊推送的账号列表, 不填表示推送给当前会话内的所有用户</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>content</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>需要特殊推送的文案, 不填的话默认为 pushContent</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>forcePush</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否强制推送, true 表示即使推送列表中的胡勇屏蔽了当前会话（如静音）, 仍能够推送当前这条内容给相应用户</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isHistoryable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否存储云端历史</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isRoamingable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否支持漫游</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isSyncable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否支持发送者多端同步</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>cc</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>是否支持抄送</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isPushable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否需要推送</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isOfflinable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否要存离线</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isUnreadable</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否计入消息未读数</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>needPushNick</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    true
                
                </td>
            

            <td class="description last"><p>是否需要推送昵称</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>isLocal</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>是否是本地消息</p>
<ul>
<li><code>true</code>表示本地消息, 那么SDK并不会发送此条消息, 而是直接调用回调表示发送成功, 并更新对应的会话</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>localFrom</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>本地消息的发送方，默认是当前用户</p>
<ul>
<li>只有发送本地消息时，才可自定义发送方</li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>replyMsg</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>要回复的消息对象，表示当前消息是对某条消息的回复</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            
<div class="param-desc">
    <p><a href="IMMessage.html"><code>消息</code></a></p>
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Message</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">var msg = nim.sendTipMsg({
    scene: &#x27;p2p&#x27;,
    to: &#x27;account&#x27;,
    tip: &#x27;tip content&#x27;,
    done: sendMsgDone
});
console.log(&#x27;正在发送p2p提醒消息, id=&#x27; + msg.idClient);
pushMsg(msg);</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="setCurrSession"><span class="type-signature"></span>setCurrSession(sessionId)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>设置当前会话</p>
<ul>
<li>设置后, 当前会话未读数会被置为 <code>0</code>, 同时开发者会收到 <code>onupdatesession</code> 回调</li>
<li>之后此会话在收到消息之后不会更新未读数</li>
<li>传空字符串的话, 重置当前会话为空</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>sessionId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>会话ID</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.setCurrSession(&#x27;sessionId&#x27;);</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="setOptions"><span class="type-signature"></span>setOptions(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>更新配置, 参数格式跟 <a href="NIM.html#.getInstance"><code>NIM.getInstance</code></a> 保持一致</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>token</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>帐号的 token, 用于建立连接</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">// 更新 token 的例子
nim.setOptions({
    token: &#x27;newToken&#x27;
});</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="stripImageMeta"><span class="type-signature"></span>stripImageMeta(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>去除图片元信息</p>
<ul>
<li>只支持通过<a href="NIM.html#previewFile"><code>预览文件</code></a>或<a href="NIM.html#sendFile"><code>发送文件消息</code></a>拿到的图片 url, 或者经过其他图片操作后拿到的图片 url</li>
<li>去除元信息后的图片将不包含 <a href="https://en.wikipedia.org/wiki/Exchangeable_image_file_format">EXIF</a> 信息</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>原图 url</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数, 成功时附上 interlace 后的图片 url</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">var url = &#x27;http://nim.nos.netease.com/MTAxMTAwMg==/bmltYV8xNDc5OTNfMTQ0MzE0NTgyNDI0M184YjFkYTMwMS02NjcxLTRiYjktYTUwZC04ZTVlZjZlNzZjMzA=&#x27;;
var interlaceUrl = nim.stripImageMeta({
    url: url,
    strip: true,
    done: stripImageMetaDone
});
function stripImageMetaDone(error, obj) {
    console.log(&#x27;去除图片元信息&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="thumbnailImage"><span class="type-signature"></span>thumbnailImage(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>生成缩略图</p>
<ul>
<li>只支持通过<a href="NIM.html#previewFile"><code>预览文件</code></a>或<a href="NIM.html#sendFile"><code>发送文件消息</code></a>拿到的图片 url, 或者经过其他图片操作后拿到的图片 url</li>
<li>width/height 限制了缩略图的尺寸<ul>
<li>width/height 必须大于等于 0, 不能同时为 0, 必须小于 4096</li>
</ul>
</li>
<li>不同模式下生成的缩略图是不一样的, 目前支持以下三种模式<ul>
<li><code>'cover'</code>: 原图片等比缩略, 缩略图一边等于请求的尺寸, 另一边大于请求的尺寸, 即缩略图刚好能覆盖住尺寸为 width*height 的矩形</li>
<li><code>'contain'</code>: 原图片等比缩略, 缩略图一边等于请求的尺寸, 另一边小于请求的尺寸, 即尺寸为 width*height 的矩形刚好能覆盖住缩略图</li>
<li><code>'crop'</code>: 先等比缩略原图片, 使得一边等于请求的尺寸, 另一边大于请求的尺寸, 然后对大于请求尺寸的那条边进行裁剪, 使得最终的图片大小刚好等于请求的尺寸</li>
</ul>
</li>
<li>如果缩略图尺寸大于图片尺寸, 默认情况下图片不会被放大, 可以传入参数<code>enlarge=true</code>来放大图片</li>
<li><code>'crop'</code> 模式下可以传入参数 axis.x 或 axis.y 来控制最后一步裁剪的位置<ul>
<li>x/y 必须为整数, 取值范围为 0-10, 此方法内部使用 Math.round 来格式化 x/y</li>
<li>x 为 0 时表示裁取最左端, x 为 10 时表示裁取最右端</li>
<li>y 为 0 时表示裁取最上端, y 为 10 时表示裁取最下端</li>
<li>x/y 默认值均为 5, 即裁取正中间</li>
</ul>
</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>原图 url</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>width</code></td>
            

            <td class="type">
            
                
<span class="param-type">Int</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>缩略图的最大宽度, 必须为整数, 此方法内部使用 Math.round 来格式化 width/height</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>height</code></td>
            

            <td class="type">
            
                
<span class="param-type">Int</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>缩略图的最大高度, 必须为整数, 此方法内部使用 Math.round 来格式化 width/height</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>mode</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>缩略模式, 目前支持以下三种模式, 请参考上面的描述</p>
<ul>
<li><code>'cover'</code></li>
<li><code>'contain'</code></li>
<li><code>'crop'</code></li>
</ul></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>axis.x</code></td>
            

            <td class="type">
            
                
<span class="param-type">Int</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p><code>'crop'</code> 模式下控制最后一步裁剪的位置, 请参考上面的描述</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>axis.y</code></td>
            

            <td class="type">
            
                
<span class="param-type">Int</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p><code>'crop'</code> 模式下控制最后一步裁剪的位置, 请参考上面的描述</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>enlarge</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    false
                
                </td>
            

            <td class="description last"><p>当图片尺寸小于要缩略的尺寸时, 是否放大图片, 默认<code>false</code>不放大</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>结果回调函数, 成功时附上缩略后的图片 url</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">var url = &#x27;http://nim.nos.netease.com/MTAxMTAwMg==/bmltYV8xNDc5OTNfMTQ0MzE0NTgyNDI0M184YjFkYTMwMS02NjcxLTRiYjktYTUwZC04ZTVlZjZlNzZjMzA=&#x27;;
var thumbnailUrl = nim.thumbnailImage({
    url: url,
    mode: &#x27;cover&#x27;,
    width: 80,
    height: 100,
    done: thumbnailImageDone
});
function thumbnailImageDone(error, obj) {
    console.log(&#x27;生成缩略图&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="transferSuperTeam"><span class="type-signature"></span>transferSuperTeam(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>转让群</p>
<ul>
<li><a href="NIM.html#transferSuperTeam"><code>转让群</code></a>后, 所有<a href="SuperTeamMember.html"><code>群成员</code></a>会收到一条类型为<a href="IMMessage.html#.attach"><code><code>'transferSuperTeam'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。此类群通知消息的<code>from</code>字段的值为转让群的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="SuperTeam.html"><code>群对象</code></a>, <code>attach</code>有一个字段<code>account</code>的值为为新群主的帐号, <code>attach</code>有一个字段<code>members</code>的值为包含新旧群主的群成员列表。</li>
<li>如果转让群的同时离开群, 那么相当于调用<a href="NIM.html#leaveSuperTeam"><code>主动退群</code></a>来离开群, 所有<a href="SuperTeamMember.html"><code>群成员</code></a>会再收到一条类型为<a href="IMMessage.html#.attach"><code><code>'leaveSuperTeam'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>account</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>新群主的帐号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>leave</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            

            

            <td class="description last"><p>转让群的同时是否离开群</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#leaveSuperTeam"><code>离开群</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.transferSuperTeam({
    teamId: &#x27;123&#x27;,
    account: &#x27;zyy2&#x27;,
    leave: false,
    done: transferOwnerDone
});
function transferOwnerDone(error, obj) {
    console.log(&#x27;转让群&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="transferTeam"><span class="type-signature"></span>transferTeam(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>转让群</p>
<ul>
<li><a href="NIM.html#transferTeam"><code>转让群</code></a>后, 所有<a href="TeamMember.html"><code>群成员</code></a>会收到一条类型为<a href="IMMessage.html#.attach"><code><code>'transferTeam'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。此类群通知消息的<code>from</code>字段的值为转让群的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="Team.html"><code>群对象</code></a>, <code>attach</code>有一个字段<code>account</code>的值为为新群主的帐号, <code>attach</code>有一个字段<code>members</code>的值为包含新旧群主的群成员列表。</li>
<li>如果转让群的同时离开群, 那么相当于调用<a href="NIM.html#leaveTeam"><code>主动退群</code></a>来离开群, 所有<a href="TeamMember.html"><code>群成员</code></a>会再收到一条类型为<a href="IMMessage.html#.attach"><code><code>'leaveTeam'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>account</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>新群主的帐号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>leave</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            

            

            <td class="description last"><p>转让群的同时是否离开群</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#leaveTeam"><code>离开群</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.transferTeam({
    teamId: &#x27;123&#x27;,
    account: &#x27;zyy2&#x27;,
    leave: false,
    done: transferOwnerDone
});
function transferOwnerDone(error, obj) {
    console.log(&#x27;转让群&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="updateCollect"><span class="type-signature"></span>updateCollect(options, done)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>更新收藏</p>
<ul>
<li>只允许更新扩展字段<code>custom</code></li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>collect</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>新的Collect对象，至少要包含<code>id</code>、<code>createTime</code>和更新后的<code>custom</code>三个字段；如要删除custom，可不填</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数，第一个参数是error，第二个参数有一个属性collect，代表更新后的收藏对象</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="updateFriend"><span class="type-signature"></span>updateFriend(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>更新好友</p>
<ul>
<li>开发者可以用此接口来更新好友的备注</li>
<li>开发者也可以使用JSON格式的扩展字段来进行扩展</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>account</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>要更新的好友的account</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>alias</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>备注</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>custom</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>扩展字段, 选填, 开发者也可以使用JSON格式的字符串来扩展此内容</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#updateFriend"><code>直接加为好友</code></a></li>
			
			<li><a href="NIM.html#applyFriend"><code>申请加为好友</code></a></li>
			
			<li><a href="NIM.html#passFriendApply"><code>通过好友申请</code></a></li>
			
			<li><a href="NIM.html#rejectFriendApply"><code>拒绝好友申请</code></a></li>
			
			<li><a href="NIM.html#deleteFriend"><code>删除好友</code></a></li>
			
			<li><a href="NIM.html#getFriends"><code>获取好友列表</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.updateFriend({
    account: &#x27;account&#x27;,
    alias: &#x27;alias&#x27;,
    custom: &#x27;custom&#x27;,
    done: updateFriendDone
});
function updateFriendDone(error, obj) {
    console.log(&#x27;更新好友&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
    if (!error) {
        onUpdateFriend(obj);
    }
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="updateInfoInSuperTeam"><span class="type-signature"></span>updateInfoInSuperTeam(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>修改个人群成员信息 (修改自己的群属性)</p>
<p>目前支持修改的属性有这些</p>
<ul>
<li><code>nickInTeam</code>: 自己在群里面的群昵称<ul>
<li>更新昵称后, 所有其它在线的<a href="SuperTeamMember.html"><code>群成员</code></a>会收到<a href="NIM.html"><code>初始化SDK</code></a>时传入的<code>onUpdateSuperTeamMember</code>回调。</li>
</ul>
</li>
<li><code>muteTeam</code>: 是否关闭此群的消息提醒, <code>true</code>表示关闭提醒, 但是SDK仍然会收到这个群的消息, SDK只是记录这个设置, 具体根据这个设置要执行的操作由第三方APP决定</li>
<li><code>custom</code>: 第三方扩展字段, 开发者可以自行扩展, 建议封装成JSON格式字符串</li>
</ul>
<p>修改自己的群属性后，所有<a href="SuperTeamMember.html"><code>群成员</code></a>会收到SDK初始化时设置的<code>onUpdateSuperTeamMember</code>回调</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>nickInTeam</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>在群里面的昵称</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>muteTeam</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>是否关闭此群的消息提醒, <code>true</code>表示关闭提醒, 但是SDK仍然会收到这个群的消息, SDK只是记录这个设置, 具体根据这个设置要执行的操作由第三方APP决定</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>custom</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>第三方扩展字段, 开发者可以自行扩展, 建议封装成JSON格式字符串</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.updateInfoInSuperTeam({
    teamId: &#x27;123&#x27;,
    // 此参数为可选参数
    nickInTeam: &#x27;群昵称&#x27;,
    // 静音群, 此参数为可选参数
    muteTeam: true,
    // 第三方扩展字段
    custom: &#x27;{}&#x27;
    done: updateInfoInSuperTeamDone
});
function updateInfoInSuperTeamDone(error, obj) {
    console.log(&#x27;修改自己的群属性&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="updateInfoInTeam"><span class="type-signature"></span>updateInfoInTeam(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>修改自己的群属性</p>
<p>目前支持修改的属性有这些</p>
<ul>
<li><code>nickInTeam</code>: 自己在群里面的群昵称<ul>
<li>更新昵称后, 所有其它在线的<a href="TeamMember.html"><code>群成员</code></a>会收到<a href="NIM.html"><code>初始化SDK</code></a>时传入的<code>onupdateteammember</code>回调。</li>
</ul>
</li>
<li><code>muteTeam</code>: 是否关闭此群的消息提醒, <code>true</code>表示关闭提醒, 但是SDK仍然会收到这个群的消息, SDK只是记录这个设置, 具体根据这个设置要执行的操作由第三方APP决定, 设置之后可以调用接口<a href="NIM.html#notifyForNewTeamMsg"><code>NIM#notifyForNewTeamMsg</code></a>来查询是否需要群消息通知</li>
<li><code>custom</code>: 第三方扩展字段, 开发者可以自行扩展, 建议封装成JSON格式字符串</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>nickInTeam</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>在群里面的昵称</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>muteTeam</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>是否关闭此群的消息提醒, <code>true</code>表示关闭提醒, 但是SDK仍然会收到这个群的消息, SDK只是记录这个设置, 具体根据这个设置要执行的操作由第三方APP决定</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>custom</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>第三方扩展字段, 开发者可以自行扩展, 建议封装成JSON格式字符串</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#updateNickInTeam"><code>修改别人的群昵称</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.updateInfoInTeam({
    teamId: &#x27;123&#x27;,
    // 此参数为可选参数
    // nickInTeam: &#x27;群昵称&#x27;,
    // 静音群, 此参数为可选参数
    // muteTeam: true,
    // 第三方扩展字段
    // custom: &#x27;{}&#x27;
    done: updateInfoInTeamDone
});
function updateInfoInTeamDone(error, obj) {
    console.log(&#x27;修改自己的群属性&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="updateLocalMsg"><span class="type-signature"></span>updateLocalMsg(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>更新本地消息</p>
<ul>
<li>更新 <code>idClient</code> 对应的本地消息</li>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功</li>
<li>如果对应的消息不存在, 算成功, 返回 null</li>
<li>这些字段只会被更新到本地数据库, 不会被更新到服务器上</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>idClient</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>idClient</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>localCustom</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>自定义字段</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>结果回调函数, 成功时会额外附上<a href="IMMessage.html"><code>消息</code></a></p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.updateLocalMsg({
    idClient: &#x27;p2p-account&#x27;,
    localCustom: &#x27;{&quot;key&quot;,&quot;value&quot;}&#x27;,
    done: updateLocalMsgDone
});
function updateLocalMsgDone(error, obj) {
    console.log(&#x27;更新本地消息&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="updateLocalSession"><span class="type-signature"></span>updateLocalSession(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>更新本地会话</p>
<ul>
<li>更新 <code>id</code> 对应的本地会话</li>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功</li>
<li>如果对应的会话不存在, 算成功, 返回 null</li>
<li>这些字段只会被更新到本地数据库, 不会被更新到服务器上</li>
<li>目前只允许更新 <code>localCustom</code></li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>id</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>localCustom</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>自定义字段</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>结果回调函数, 成功时会额外附上<a href="Session.html"><code>会话</code></a></p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.updateLocalSession({
    id: &#x27;p2p-account&#x27;,
    localCustom: &#x27;{&quot;key&quot;,&quot;value&quot;}&#x27;,
    done: updateLocalSessionDone
});
function updateLocalSessionDone(error, obj) {
    console.log(&#x27;更新本地会话&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="updateLocalSysMsg"><span class="type-signature"></span>updateLocalSysMsg(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>更新本地系统通知</p>
<ul>
<li>更新 <code>idServer</code> 对应的本地系统通知</li>
<li>如果不<a href="support.html#.db"><code>支持数据库</code></a>, 算成功</li>
<li>如果对应的系统通知不存在, 算成功, 返回 null</li>
<li>这些字段只会被更新到本地数据库, 不会被更新到服务器上</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>idServer</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>idServer</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>status</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>状态</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>localCustom</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>自定义字段</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>结果回调函数, 成功时会额外附上<a href="SystemMessage.html"><code>系统通知</code></a></p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.updateLocalSysMsg({
    idServer: &#x27;1234&#x27;,
    status: &#x27;bingo&#x27;,
    localCustom: &#x27;{&quot;key&quot;,&quot;value&quot;}&#x27;,
    done: updateLocalSysMsgDone
});
function updateLocalSysMsgDone(error, obj) {
    console.log(error);
    console.log(obj);
    console.log(&#x27;更新本地系统通知&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;));
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="updateMsgPin"><span class="type-signature"></span>updateMsgPin(options, done)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>更新PIN消息的扩展字段</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>msg</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>被PIN的消息对象</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>pinCustom</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>要更新的PIN扩展字段</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数，第一个参数是error，代表是否有错</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="updateMuteStateInTeam"><span class="type-signature"></span>updateMuteStateInTeam(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>更新群成员禁言状态</p>
<ul>
<li><a href="NIM.html#updateMuteStateInTeam"><code>更新群成员禁言状态</code></a>后, 所有<a href="TeamMember.html"><code>群成员</code></a>会收到一条类型为<a href="IMMessage.html#.attach"><code><code>'updateTeamMute'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。此类群通知消息的<code>from</code>字段的值为操作方, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="Team.html"><code>群对象</code></a>, <code>attach</code>有一个字段<code>account</code>的值为被禁言的帐号, <code>attach</code>有一个字段<code>members</code>的值为被禁言的群成员列表。</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>account</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>要修改昵称的<a href="TeamMember.html"><code>群成员</code></a>的帐号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>mute</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            

            

            <td class="description last"><p>是否要禁言</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.updateMuteStateInTeam({
    teamId: &#x27;123&#x27;,
    account: &#x27;a&#x27;,
    mute: true,
    done: updateMuteStateInTeamDone
})
function updateMuteStateInTeamDone(error, obj) {
    console.log(&#x27;更新群成员禁言状态&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="updateMyInfo"><span class="type-signature"></span>updateMyInfo(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>更新我的名片</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>nick</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>昵称</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>avatar</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>头像</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>sign</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>签名</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>gender</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p><a href="User.html#.gender"><code>性别</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>email</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>邮箱</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>birth</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>生日</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>tel</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>手机号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>custom</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>扩展字段</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#getUser"><code>获取用户名片</code></a></li>
			
			<li><a href="NIM.html#getUsers"><code>获取用户名片数组</code></a></li>
			
			<li><a href="NIM.html#updateMyInfo"><code>更新登录用户的名片</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.updateMyInfo({
    nick: &#x27;newNick&#x27;,
    avatar: &#x27;http://newAvatar&#x27;,
    sign: &#x27;newSign&#x27;,
    gender: &#x27;male&#x27;,
    email: &#x27;new@email.com&#x27;,
    birth: &#x27;1900-01-01&#x27;,
    tel: &#x27;13523578129&#x27;,
    custom: &#x27;{type: &quot;newCustom&quot;, value: &quot;new&quot;}&#x27;,
    done: updateMyInfoDone
});
function updateMyInfoDone(error, user) {
    console.log(&#x27;更新登录用户的名片&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, user);
    if (!error) {
        onUpdateMyInfo(user);
    }
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="updateNickInSuperTeam"><span class="type-signature"></span>updateNickInSuperTeam(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>修改别人的群昵称</p>
<ul>
<li>所有其它在线的<a href="SuperTeamMember.html"><code>超大群群成员</code></a>会收到<a href="NIM.html"><code>初始化SDK</code></a>时传入的<code>onUpdateSuperTeamMember</code>回调</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>account</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>要修改昵称的<a href="SuperTeamMember.html"><code>超大群群成员</code></a>的帐号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>nickInTeam</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群昵称</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#updateInfoInTeam"><code>修改自己的群属性</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.updateNickInSuperTeam({
    teamId: &#x27;123&#x27;,
    account: &#x27;a2&#x27;,
    nickInTeam: &#x27;群昵称&#x27;,
    done: updateNickInSuperTeamDone
});
function updateNickInSuperTeamDone(error, obj) {
    console.log(&#x27;修改自己的群属性&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="updateNickInTeam"><span class="type-signature"></span>updateNickInTeam(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>修改别人的群昵称</p>
<ul>
<li>所有其它在线的<a href="TeamMember.html"><code>群成员</code></a>会收到<a href="NIM.html"><code>初始化SDK</code></a>时传入的<code>onupdateteammember</code>回调</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>account</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>要修改昵称的<a href="TeamMember.html"><code>群成员</code></a>的帐号</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>nickInTeam</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群昵称</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	
	<dt class="tag-see method-doc-label method-doc-details-label">See:</dt>
	<dd class="tag-see">
		<ul>
			<li><a href="NIM.html#updateInfoInTeam"><code>修改自己的群属性</code></a></li>
			</ul>
	</dd>
	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.updateNickInTeam({
    teamId: &#x27;123&#x27;,
    account: &#x27;a2&#x27;,
    nickInTeam: &#x27;群昵称&#x27;,
    done: updateNickInTeamDone
});
function updateNickInTeamDone(error, obj) {
    console.log(&#x27;修改自己的群属性&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="updateServerSession"><span class="type-signature"></span>updateServerSession(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>更新服务器上某个会话的扩展字段</p>
<ul>
<li>指更新服务器上会话列表中的会话，不是漫游会话</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>scene</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>会话<a href="IMMessage.html#.scene"><code>场景</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>to</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>对方账号或群ID</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>extra</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>要更新的扩展字段</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.updateServerSession({
    scene: &#x27;p2p&#x27;,
    to: &#x27;account&#x27;,
    extra: &#x27;xxxx&#x27;,
    done: function (obj) {
       console.log(&#x27;更新会话&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
    }
});</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="updateSessionsWithMoreRoaming"><span class="type-signature"></span>updateSessionsWithMoreRoaming(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>更新漫游消息不全的会话的漫游时间戳</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>msg</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>完整漫游消息列表中最早的一条消息，即在这条消息之后的本地消息列表是完整的，<code>msg</code>至少应有<code>time</code>、<code>idServer</code>、<code>from</code>、<code>to</code>、<code>scene</code>五个属性</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="updateStickTopSession"><span class="type-signature"></span>updateStickTopSession(options, done)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>更新置顶会话的扩展字段</p>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>id</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>会话ID</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>topCustom</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>扩展字段</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数，第一个参数是error，代表是否有错</p></td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    

    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="updateSuperTeam"><span class="type-signature"></span>updateSuperTeam(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>更新群</p>
<ul>
<li><a href="NIM.html#updateSuperTeam"><code>更新超大群</code></a>后, 所有<a href="SuperTeamMember.html"><code>群成员</code></a>会收到一条类型为<a href="IMMessage.html#.attach"><code><code>'updateSuperTeam'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。此类群通知消息的<code>from</code>字段的值为更新群的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为被更新的<a href="SuperTeam.html"><code>群信息</code></a>。</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>name</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>群名字</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>avatar</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>群头像</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>intro</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>群简介</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>announcement</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>群公告</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>joinMode</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p><a href="SuperTeam.html#.joinMode"><code>超大群加入方式</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>beInviteMode</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p><a href="SuperTeam.html#.beInviteMode"><code>超大群被邀请模式</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>custom</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>扩展字段</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.updateSuperTeam({
    teamId: &#x27;123&#x27;,
    name: &#x27;群名字&#x27;,
    avatar: &#x27;avatar&#x27;,
    intro: &#x27;群简介&#x27;,
    announcement: &#x27;群公告&#x27;,
    custom: &#x27;自定义字段&#x27;,
    done: updateSuperTeamDone
});
function updateSuperTeamDone(error, team) {
    console.log(&#x27;更新群&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, team);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="updateSuperTeamMembersMute"><span class="type-signature"></span>updateSuperTeamMembersMute(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>更新群成员禁言状态</p>
<ul>
<li><a href="NIM.html#updateSuperTeamMembersMute"><code>更新群成员禁言状态</code></a>后, 所有<a href="SuperTeamMember.html"><code>超大群群成员</code></a>会收到一条类型为<a href="IMMessage.html#.attach"><code><code>'updateSuperTeamMembersMute'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。此类群通知消息的<code>from</code>字段的值为操作方, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="SuperTeam.html"><code>超大群对象</code></a>, <code>attach</code>有一个字段<code>account</code>的值为被禁言的帐号, <code>attach</code>有一个字段<code>members</code>的值为被禁言的群成员列表。</li>
<li><a href="NIM.html#updateSuperTeamMembersMute"><code>更新群成员禁言状态</code></a>后, 会收到SDK初始化时设置的<code>onUpdateSuperTeamMembersMute</code>回调</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>accounts</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array</span>



            
            </td>

            

            

            <td class="description last"><p>要修改禁言的<a href="TeamMember.html"><code>群成员</code></a>帐号列表，每次最多修改十个</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>mute</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>



            
            </td>

            

            

            <td class="description last"><p>是否要禁言</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.updateSuperTeamMembersMute({
    teamId: &#x27;123&#x27;,
    accounts: [&#x27;ss&#x27;, &#x27;aa&#x27;],
    mute: true,
    done: updateSuperTeamMembersMuteDone
})
function updateSuperTeamMembersMuteDone(error, obj) {
    console.log(&#x27;更新群成员禁言状态&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="updateSuperTeamMute"><span class="type-signature"></span>updateSuperTeamMute(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>超大群禁言</p>
<ul>
<li>更新超大群的禁言状态后，所有<a href="SuperTeamMember.html"><code>超大群群成员</code></a>会收到一条类型为<a href="IMMessage.html#.attach"><code><code>'updateSuperTeam'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。此类群通知消息的<code>from</code>字段的值为操作方, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为对应的<a href="SuperTeam.html"><code>超大群对象</code></a>, <code>attach</code>有一个字段<code>users</code>的值为对应的操作人列表</li>
<li>更新超大群的禁言状态后, 会收到SDK初始化时设置的<code>onUpdateSuperTeam</code>回调</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>待禁言群的群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>mute</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>是否禁言</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.updateSuperTeamMute({
   teamId: &#x27;1027484&#x27;,
   mute: true,
   done: updateSuperTeamMuteDone
})
function updateSuperTeamMuteDone (error, obj) {
  console.log(&#x27;禁言群&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;));
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="updateTeam"><span class="type-signature"></span>updateTeam(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>更新群</p>
<ul>
<li><a href="Team.html#.type"><code>普通群</code></a>不可以更新<ul>
<li><a href="Team.html#.joinMode"><code>群加入方式</code></a></li>
<li><a href="Team.html#.beInviteMode"><code>群被邀请模式</code></a></li>
<li><a href="Team.html#.inviteMode"><code>群邀请模式</code></a></li>
<li><a href="Team.html#.updateTeamMode"><code>群信息修改权限</code></a></li>
<li><a href="Team.html#.updateCustomMode"><code>群信息自定义字段修改权限</code></a></li>
</ul>
</li>
<li><a href="NIM.html#updateTeam"><code>更新群</code></a>后, 所有<a href="TeamMember.html"><code>群成员</code></a>会收到一条类型为<a href="IMMessage.html#.attach"><code><code>'updateTeam'</code></code></a>的<a href="IMMessage.html#.type"><code>群通知消息</code></a>。此类群通知消息的<code>from</code>字段的值为更新群的人的帐号, <code>to</code>字段的值为对应的群ID, <code>attach</code>有一个字段<code>team</code>的值为被更新的<a href="Team.html"><code>群信息</code></a>。</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Argument</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>teamId</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>群id</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>name</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>群名字</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>avatar</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>群头像</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>intro</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>群简介</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>announcement</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>群公告</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>joinMode</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p><a href="Team.html#.joinMode"><code>群加入方式</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>beInviteMode</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p><a href="Team.html#.beInviteMode"><code>群被邀请模式</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>inviteMode</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p><a href="Team.html#.inviteMode"><code>群邀请模式</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>updateTeamMode</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p><a href="Team.html#.updateTeamMode"><code>群信息修改权限</code></a></p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>updateCustomMode</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>Team.updateCustomMode|群信息自定义字段修改权限}</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>custom</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>扩展字段</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"><p>结果回调函数</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.updateTeam({
    teamId: &#x27;123&#x27;,
    name: &#x27;群名字&#x27;,
    avatar: &#x27;avatar&#x27;,
    intro: &#x27;群简介&#x27;,
    announcement: &#x27;群公告&#x27;,
    custom: &#x27;自定义字段&#x27;,
    done: updateTeamDone
});
function updateTeamDone(error, team) {
    console.log(&#x27;更新群&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, team);
}</pre>


    
</dd>

        
            
<hr>
<dt>
    <h4 class="name" id="viewImageStripMeta"><span class="type-signature"></span>viewImageStripMeta(options)</h4>
    
    
</dt>
<dd>

    
    <div class="description">
        <p>预览去除图片元信息</p>
<ul>
<li>只支持通过<a href="NIM.html#previewFile"><code>预览文件</code></a>或<a href="NIM.html#sendFile"><code>发送文件消息</code></a>拿到的图片 url, 或者经过其他图片操作后拿到的图片 url</li>
<li>去除元信息后的图片将不包含 <a href="https://en.wikipedia.org/wiki/Exchangeable_image_file_format">EXIF</a> 信息</li>
</ul>
    </div>
    

    

    

    
    
        <h5>Parameters:</h5>
        

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>



            
            </td>

            

            

            <td class="description last"><p>配置参数</p>
                <h6 class="method-params-label method-subparams-label">Properties</h6>
                

<table class="params table table-striped">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>url</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>



            
            </td>

            

            

            <td class="description last"><p>原图 url</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>done</code></td>
            

            <td class="type">
            
                
<span class="param-type">done</span>



            
            </td>

            

            

            <td class="description last"><p>结果回调函数, 成功时附上 interlace 后的图片 url</p></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    

    

    

    

    

    
    <h5>Returns:</h5>
    
            


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Void</span>



    </dd>
</dl>


        

    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">var url = &#x27;http://nim.nos.netease.com/MTAxMTAwMg==/bmltYV8xNDc5OTNfMTQ0MzE0NTgyNDI0M184YjFkYTMwMS02NjcxLTRiYjktYTUwZC04ZTVlZjZlNzZjMzA=&#x27;;
var stripMetaUrl = nim.viewImageStripMeta({
    url: url,
    strip: true
});</pre>


    
</dd>

        </dl>
    

    
        <h3 class="subsection-title">Type Definitions</h3>

        <dl>
                
<hr>
<dt class="name" id="publishEvent">
    <h4 id="publishEvent">publishEvent</h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>发布事件</p>
    </div>
    

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.publishEvent({
    type: 100000,
    value: 2,
    custom: &#x27;hello world&#x27;,
    vaildTime: 60,
    sync: false,
    done: publishEventDone
});
function publishEventDone(error, obj) {
    console.log(&#x27;发布事件&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

            
                
<hr>
<dt class="name" id="querySubscribeEventsByAccounts">
    <h4 id="querySubscribeEventsByAccounts">querySubscribeEventsByAccounts</h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>按账号获取指定事件的订阅关系</p>
    </div>
    

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.querySubscribeEventsByAccounts({
    type: 100000,
    accounts: [&#x27;cs3&#x27;],
    done: querySubscribeEventDone
});
function querySubscribeEventDone(error, obj) {
    console.log(&#x27;获取订阅列表&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

            
                
<hr>
<dt class="name" id="querySubscribeEventsByType">
    <h4 id="querySubscribeEventsByType">querySubscribeEventsByType</h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>查询指定事件的全部订阅关系</p>
    </div>
    

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.querySubscribeEventsByType({
    type: 100000,
    done: querySubscribeEventDone
});
function querySubscribeEventDone(error, obj) {
    console.log(&#x27;获取订阅列表&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

            
                
<hr>
<dt class="name" id="subscribeEvent">
    <h4 id="subscribeEvent">subscribeEvent</h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>订阅事件</p>
    </div>
    

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.subscribeEvent({
    type: 100000,
    accounts: [&#x27;cs3&#x27;],
    subscribeTime: 70,
    sync: true,
    done: subscribeEventDone
});
function subscribeEventDone(error, obj) {
    console.log(&#x27;订阅事件&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

            
                
<hr>
<dt class="name" id="unSubscribeEventsByAccounts">
    <h4 id="unSubscribeEventsByAccounts">unSubscribeEventsByAccounts</h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>按账号取消指定事件的订阅关系</p>
    </div>
    

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.unSubscribeEventsByAccounts({
    type: 100000,
    accounts: [&#x27;cs3&#x27;],
    done: unSubscribeEventDone
});
function unSubscribeEventDone(error, obj) {
    console.log(&#x27;取消订阅事件&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

            
                
<hr>
<dt class="name" id="unSubscribeEventsByType">
    <h4 id="unSubscribeEventsByType">unSubscribeEventsByType</h4>

    
</dt>
<dd>
    
    <div class="description">
        <p>取消指定事件的全部订阅关系</p>
    </div>
    

    

    
<dl class="details">
    

	

	

	

    

    

    

    

	

	

	

	

	



	

	

	

	
</dl>


    
        <h5>Example</h5>
        
    <pre class="sunlight-highlight-javascript">nim.unSubscribeEventsByType({
    type: 100000,
    done: unSubscribeEventDone
});
function unSubscribeEventDone(error, obj) {
    console.log(&#x27;取消订阅事件&#x27; + (!error?&#x27;成功&#x27;:&#x27;失败&#x27;), error, obj);
}</pre>


    
</dd>

            </dl>
    

    
</article>

</section>




		</div>
	</div>

	<div class="clearfix"></div>

	
		<div class="col-md-3">
			<div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md"></div>
		</div>
	

</div>
</div>


    <div class="modal fade" id="searchResults">
      <div class="modal-dialog">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title">Search results</h4>
          </div>
          <div class="modal-body"></div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
          </div>
        </div><!-- /.modal-content -->
      </div><!-- /.modal-dialog -->
    </div>


<footer>


<span class="jsdoc-message">
	Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
	
		on 2020-05-11T17:02:55+08:00
	
	using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>
</footer>

<script src="scripts/docstrap.lib.js"></script>
<script src="scripts/toc.js"></script>

    <script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>


<script>
$( function () {
	$( "[id*='$']" ).each( function () {
		var $this = $( this );

		$this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
	} );

	$( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () {
		var $this = $( this );

		var example = $this.find( "code" );
		exampleText = example.html();
		var lang = /{@lang (.*?)}/.exec( exampleText );
		if ( lang && lang[1] ) {
			exampleText = exampleText.replace( lang[0], "" );
			example.html( exampleText );
			lang = lang[1];
		} else {
			var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
			lang = langClassMatch ? langClassMatch[1] : "javascript";
		}

		if ( lang ) {

			$this
			.addClass( "sunlight-highlight-" + lang )
			.addClass( "linenums" )
			.html( example.html() );

		}
	} );

	Sunlight.highlightAll( {
		lineNumbers : false,
		showMenu : true,
		enableDoclinks : true
	} );

	$.catchAnchorLinks( {
        navbarOffset: 10
	} );
	$( "#toc" ).toc( {
		anchorName  : function ( i, heading, prefix ) {
			return $( heading ).attr( "id" ) || ( prefix + i );
		},
		selectors   : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
		showAndHide : false,
		smoothScrolling: true
	} );

	$( "#main span[id^='toc']" ).addClass( "toc-shim" );
	$( '.dropdown-toggle' ).dropdown();

    $( "table" ).each( function () {
      var $this = $( this );
      $this.addClass('table');
    } );

} );
</script>



<!--Navigation and Symbol Display-->


<!--Google Analytics-->



    <script type="text/javascript">
        $(document).ready(function() {
            SearcherDisplay.init();
        });
    </script>


</body>
</html>